chris martens (they/them) 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.
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.