Skip to content

Instantly share code, notes, and snippets.

@almet
Created November 16, 2010 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almet/702623 to your computer and use it in GitHub Desktop.
Save almet/702623 to your computer and use it in GitHub Desktop.
main = do print(sumlist problem1)
problem1 = [i | i <- [1..1000], i `mod` 3 == 0 || i `mod` 5 == 0]
sumlist [] = 0
sumlist (head:tail) = head + sumlist(tail)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment