chris martens on Nostr: you can index into a list with a natural number (sequence of 1s). you can index into ...
you can index into a list with a natural number (sequence of 1s).
you can index into a tree with a binary number (sequence of left/right choices).
you can index into a grid/2D array with a pair of numbers.
what's the general pattern this follows? one-holed contexts/type derivatives/zippers rely on this structure implicitly, but i haven't seen these indexing structures documented independently.
Published at
2024-08-06 16:51:29Event JSON
{
"id": "765905fbccf538eddc5acb989ca774b182e00fe6c981eb15b232680caee21296",
"pubkey": "a0732c7504ef9fb84247ed1a1d5d6db35c58deae158b4527acb596ebd5f00423",
"created_at": 1722963089,
"kind": 1,
"tags": [
[
"proxy",
"https://hci.social/users/chrisamaphone/statuses/112916109020951779",
"activitypub"
]
],
"content": "you can index into a list with a natural number (sequence of 1s).\n\nyou can index into a tree with a binary number (sequence of left/right choices).\n\nyou can index into a grid/2D array with a pair of numbers.\n\nwhat's the general pattern this follows? one-holed contexts/type derivatives/zippers rely on this structure implicitly, but i haven't seen these indexing structures documented independently.",
"sig": "f3ba233db5256c3ec62b6419e13353324c7171622744feaff09d1fb37f632e90156e6706fd15d91208ac638d50010b86272b7a5c483023fb5bf64911fffb06c7"
}