Skip to content

Instantly share code, notes, and snippets.

@ClausPolanka
Created October 15, 2010 14:09
Show Gist options
  • Save ClausPolanka/628239 to your computer and use it in GitHub Desktop.
Save ClausPolanka/628239 to your computer and use it in GitHub Desktop.
The sum of all odd squares that are smaller than 10,000 in Haskell
sum (takeWhile (<10000) (filter odd (map (^2) [1..])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment