Skip to content

Instantly share code, notes, and snippets.

@huseyinyilmaz
Forked from spiegela/folding_funs.erl
Last active August 29, 2015 14:08
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 huseyinyilmaz/7a7a1cc251f071d226a1 to your computer and use it in GitHub Desktop.
Save huseyinyilmaz/7a7a1cc251f071d226a1 to your computer and use it in GitHub Desktop.
-module("folding_funs").
-export([transform_something/1]).
transformations() ->
[fun trans1/1, fun trans2/1, fun trans3/1].
transform_something(A) ->
lists:foldl(fun(Fun, Acc) -> Fun(Acc) end, A, transformations()).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment