12 ms·
Nice F# snippet! This just looks so simple and elegant. As another approach, the "enum" types the OP mentions map to discriminated unions in F#. FWIW your fin
by latkin 12y ago
Nice F# snippet! This just looks so simple and elegant. As another approach, the "enum" types the OP mentions map to discriminated unions in F#.
FWIW your final wildcard match can be (modestly) simplified to just
| _ -> num.ToString()
and the last line can be distilled to just
|> List.iter (printfn "%s")