Skip to content

Instantly share code, notes, and snippets.

@spiegela
Created October 30, 2014 13:53
Show Gist options
  • Save spiegela/70344ef6ce39a4474425 to your computer and use it in GitHub Desktop.
Save spiegela/70344ef6ce39a4474425 to your computer and use it in GitHub Desktop.
-module("folding_funs").
-export([transform_something/1]).
transformations() ->
[fun trans1/2, fun trans2/2, fun trans3/2].
transform_something(A) ->
lists:foldl(fun(Fun, Acc) ->
Fun(A1, Acc)
end, A1, transformations()).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment