Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure they are quite equivalent, the semantics of pattern matching tend to be different: in lisps lists are always a kind of binary tree so (list 1 2 3) is really (1 . (2 . (3 . nil))), this has a consequence for unification in that (list 1 2 3) will match (x y) as 1 and (list 2 3). In Mathematica on the other hand lists tend to be flatter if you will, and there is this concept of Sequence which I sometimes find problematic.


I don't think that's true: (x y) is (x . (y . nil)) and shouldn't match (1 . (2 . (3 . nil))), because nil would have to match (3 . nil).




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: