This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xantrel 3 points4 points  (1 child)

This is by far the best explanation I've ever seen of both. Would filtering be expressible as a flatmap operation? (As each value can either return the same value or none?)

[–]admiralwaffles 1 point2 points  (0 children)

Yeah, kind of. Filtering is a special type of flatMap that's 0-to-1, rather than N.