Skip to content

Instantly share code, notes, and snippets.

@msackman
Created March 31, 2011 14:07
Show Gist options
  • Save msackman/896402 to your computer and use it in GitHub Desktop.
Save msackman/896402 to your computer and use it in GitHub Desktop.
Before:
-module(test_cut).
-compile({parse_transform, cut}).
-compile(export_all).
test_cut() ->
F0 = foo(a, b, _, 5+6, _),
F1 = F0(_, e),
F1(c).
foo(a,b,c,11,e) -> ok.
After:
-file("test/src/test_cut.erl", 1).
-module(test_cut).
-compile(export_all).
test_cut() ->
F0 = fun (__cut_0, __cut_1) ->
foo(a, b, __cut_0, 5 + 6, __cut_1)
end,
F1 = fun (__cut_2) -> F0(__cut_2, e) end,
F1(c).
foo(a, b, c, 11, e) -> ok.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment