Skip to content

Instantly share code, notes, and snippets.

@vgaltes
Created May 10, 2015 14:33
Show Gist options
  • Save vgaltes/06f0e841f0a82d9d7d8c to your computer and use it in GitHub Desktop.
Save vgaltes/06f0e841f0a82d9d7d8c to your computer and use it in GitHub Desktop.
FSharp Pattern Matching - Partial active patterns
let (|Fizz|_|) n = if n % 3 = 0 then Some Fizz else None
let (|Buzz|_|) n = if n % 5 = 0 then Some Buzz else None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment