Skip to content

Instantly share code, notes, and snippets.

@etscrivner
Created September 24, 2014 04:32
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 etscrivner/6d2871911646e2aa979d to your computer and use it in GitHub Desktop.
Save etscrivner/6d2871911646e2aa979d to your computer and use it in GitHub Desktop.
Euler problem 1 in ocaml
let result = List.range 1 1000
|> List.filter ~f:(fun n -> (n mod 3) = 0 || (n mod 5) = 0)
|> List.reduce ~f:(+);;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment