3 ms·
>Like they call the first element in a list / the other elements “list[0]” and “list[1..]” instead of “car” and “cdr”? car and cdr are remnants of an ancient i
by kingaillas 6y ago
>Like they call the first element in a list / the other elements “list[0]” and “list[1..]” instead of “car” and “cdr”?
car and cdr are remnants of an ancient instruction set (https://en.wikipedia.org/wiki/CAR_and_CDR https://en.wikipedia.org/wiki/CAR_and_CDR)... first/rest, head/tail are better. Actually doesn't Haskell use head/tail for lists? Except even there what is in the prelude is busted since head/tail are partial.