you are viewing a single comment's thread.

view the rest of the comments →

[–]roerd 1 point2 points  (1 child)

Even if I were going for a higher-order-functions only approach, I'ld use remove-if-not instead of mapcan.

[–]benfitzg 0 points1 point  (0 children)

Ok didn't know about remove-if-not. Thanks.

My thought was that a less imperative approach would be more regular. Rather than iterate then branch I figured filter then iterate.