Created
May 4, 2014 05:30
-
-
Save akimboyko/7a8cb1e1f0e0904f3c34 to your computer and use it in GitHub Desktop.
Count number of letters written out in words without spaces or hyphens using F# and Humanizer https://github.com/MehdiK/Humanizer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r @"Humanizer.dll" | |
open Humanizer | |
[1 .. 1000] |> | |
Seq.map (fun n -> Humanizer.NumberToWordsExtension.ToWords(n)) |> | |
Seq.collect(fun writtenOutInWords -> writtenOutInWords.ToCharArray()) |> | |
Seq.where(fun ch -> ch <> ' ') |> | |
Seq.where(fun ch -> ch <> '-') |> | |
Seq.length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment