3 ms·
No, he is wrong in this case. It would work fine. What he probably meant to show is that a list with a single item also has a tail. Meaning if you wanted to do:
by kungfooguru 13y ago
No, he is wrong in this case. It would work fine. What he probably meant to show is that a list with a single item also has a tail. Meaning if you wanted to do:
map(F, [H]) -> [F(H)];
map(F, [H|T]) -> [F(H) | map(F, T)].
Order does matter