Snippets created by Richard Broida

Inspired by http://dave.fayr.am/posts/2012-10-4-finding-fizzbuzz.html Rules are in a list of lambdas that can be easily modified. A pattern-matching recursive function applies them in the correct order.

Simple function to apply operators to option types. Applies the operator to each value and returns a new option containing the result. Treats None as the operator's identity element (i.e., ignores it).

This version of FizzBuzz uses forward composition instead of recursive pattern matching (see http://fssnip.net/e7). All the rules, including the default case, are in a list of lambdas that can be easily modified. The function executeRules composes the list into a single rule and executes it.