Search posts, tags, users, and pages
Jindřich Ivánek
F# developer
Every F# programmer is likely familiar with pattern matching using the match keyword, as illustrated below: match x with | Some 0 -> "Zero" | Some n when n > 0 -> "Positive" | Some n when n < 0 -> "Negative" | None -> "Unknown" However, a less well-...
David Neale
type MultipleOptions = | Thingys of string * int | Wotsits of int
let multiInputMultiply (MultipleOptions.Thingys (_, v) | MultipleOptions.Wotsits v) = v * 42
let r = multiInputMultiply (Thingys ("hey!", 88)) let s = multiInputMultiply (Wotsits 44)
Christian Steinert
Great series. Looking forward to more!
Thanks!
David Neale
type MultipleOptions = | Thingys of string * int | Wotsits of int
let multiInputMultiply (MultipleOptions.Thingys (_, v) | MultipleOptions.Wotsits v) = v * 42
let r = multiInputMultiply (Thingys ("hey!", 88)) let s = multiInputMultiply (Wotsits 44)