2 ms·
For those who couldn't see the page: The most interesting feature of this language is that all functions commute over lists. For example: [2,3,5,7,9,11].at(
by cchooper 18y ago
For those who couldn't see the page:
The most interesting feature of this language is that all functions commute over lists. For example:
[2,3,5,7,9,11].at(3)
returns 7, but if you pass a list to 'at' instead:
[2,3,5,7,9,11].at([1,3,4])
you get [3,7,9]. This means you don't need functions like 'map' to apply a function to a list. You just call the function on the list and it automatically commutes. It works for trees too:
[2,3,5,7,9,11].at([1,[2,3],4])
returns [3,[5,7],9].