sw5355700
2022-5-3 20:52:00

sw5355700
2022-5-3 21:09:01

?


sw5355700
2022-5-3 21:14:30

ben.knoble
2022-5-3 21:31:04

I think that you meant to test if xs is null, not if the car is null. That would simplify things and also not break on the empty (cursed) list


sw5355700
2022-5-3 22:15:47

sw5355700
2022-5-3 22:19:06

Maybe I could write a research paper where I show that interchanging first & second of pairs doesn’t matter. :eyes:


sw5355700
2022-5-3 22:20:11

And I could prove it using denotational semantics by just copy-pasting the proof for regular pairs.


sw5355700
2022-5-3 22:57:11

sw5355700
2022-5-3 23:00:47

This is a lisp I just published. It’s similar to Scheme but differs in that the equality operator (=) works with any datum and lists when compared with nil. Equality of anything else is undefined. It also differs when evaluating if statements. Anything that’s not true is false. The opposite of Scheme.


sw5355700
2022-5-3 23:03:58

Datum and data (lists) are copied by value. Scheme only copies datum by value and data by reference. This is how the evaluator for the articles work but, it’s not the correct behavior this lisp.