3 ms·
() is equivalent to an empty list and nil according to this notation, in which case both would be proper lists. But according to pg, in bel, (a b . c) is not a
by imdhmd 7y ago
() is equivalent to an empty list and nil according to this notation, in which case both would be proper lists. But according to pg, in bel, (a b . c) is not a proper list.
Edit: I think I understand now, hmm.
- erik_seaberg 7y agoThink of a proper list like a degenerate tree with all the values on the left and structure on the right. A dotted list puts the last value on the right, where nil would usually be. Dotted lists are pretty rare. They mostly show up in association lists, where key/value pairs are stored as ((name . dave) (type . user)) and adding a pair to the front of the list shadows any other pairs with the same key.