F# – Combining predicates

I came across this SO question the other day, and I really liked Daniel’s answer as it illustrates the beauty and elegance of F# and functional programming in general!

image

Personally I love the combinators approach, and for anyone else who’s interested to see what else you can do with combinators, check out the beautifully crafted FParsec, a parser combinator library for F#.

Leave a Comment

Your email address will not be published. Required fields are marked *