Digital Mark λ 📚 🕹 💾 🥃 on Nostr: nprofile1q…dl9v9 (a . (b . nil)) is just list (a b), but ((nil . (a . nil)) . (b . ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq9y8xknr5twkrg2aeu6dyt9rhk5eg6punm4kl4q07pp0av8aa47es8dl9v9 (nprofile…l9v9) (a . (b . nil)) is just list (a b), but ((nil . (a . nil)) . (b . nil)) etc makes a tree, (value . leafs) style. But usually you'd do that with records instead, not as efficient but more readable.
I really only use dotted pairs for alists, so nil in non-terminal position is rare, even an on/off set could be coded with (foo . #f)
#lisp #scheme
I really only use dotted pairs for alists, so nil in non-terminal position is rare, even an on/off set could be coded with (foo . #f)
#lisp #scheme