Created
February 11, 2012 15:56
-
-
Save bonipart/1801279 to your computer and use it in GitHub Desktop.
Problem 3 of 3, embed.ly challenge
This file contains 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
main = print ((length . takeWhile( <= wordCount/2) . scanl1 (+) $ uniqueWords) +1) | |
where | |
uniqueWords = map (\x -> 2520 / x) [1..900] --list of unique word frequencies | |
wordCount = sum uniqueWords --total number of words in text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment