Closed christianp closed 1 month ago
This is where we could really do with lambdas. I'm not keen on implementing another 'works like map' function where you give the name(s) to bind as an argument.
This function is now in, called separate(list, condition)
.
e.g.
partition(1..5, x, mod(x,2)=0)
would return[ [2, 4], [1, 3, 5] ]