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#.

 

Learn to build Production-Ready Serverless applications

Want to learn how to build Serverless applications and follow best practices? Subscribe to my newsletter and join over 5,000 AWS & Serverless enthusiasts who have signed up already.

Leave a Comment

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