3 ms·
The problem is that lisp APIs tend to treat paired sequences as equal citizens, whereas PHP treats paired arrays as a special case and they're effectively a dif
by eyelidlessness 6y ago
The problem is that lisp APIs tend to treat paired sequences as equal citizens, whereas PHP treats paired arrays as a special case and they're effectively a different data type. This is the same problem with how Erlang/BEAM languages treat strings as a list of character data. It's the same until it's not, and then it's decidedly not.
- kazinator 6y agoThis is the TXR Lisp interactive listener of TXR 249. Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet. Poke a few holes in TXR with a fork before heating in the microwave. 1> [mapcar succ "abc"] "bcd" 2> (car "abc") #\a 3> (cdr "abc") "bc" 4> (cadr "abc") #\b 5> (cddr "abc") "c" 6> (cdddr "abc") nil 7> (rplaca (copy "abc") #\x) "xbc" 8> (rplacd (copy "abc") "yz") "ayz" 9> (ldiff "abcd" "cd") "ab"