Skip to content

Instantly share code, notes, and snippets.

@slimane
Created March 5, 2014 03:59
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 slimane/9360903 to your computer and use it in GitHub Desktop.
Save slimane/9360903 to your computer and use it in GitHub Desktop.
--haskell
foldl (+) 0 $ filter (<5) [1,2,3,4,5,6]
--elixiri
[1,2,3,4,5,6] |> Enum.filter(&(&1 < 5)) |> List.foldl(0, &(&1 + &2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment