aboutsummaryrefslogtreecommitdiff
path: root/gen/src/gleam@function.erl
diff options
context:
space:
mode:
Diffstat (limited to 'gen/src/gleam@function.erl')
-rw-r--r--gen/src/gleam@function.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/gen/src/gleam@function.erl b/gen/src/gleam@function.erl
new file mode 100644
index 0000000..f014d37
--- /dev/null
+++ b/gen/src/gleam@function.erl
@@ -0,0 +1,10 @@
+-module(gleam@function).
+-compile(no_auto_import).
+
+-export([compose/2, flip/1]).
+
+compose(Fun1, Fun2) ->
+ fun(A) -> Fun2(Fun1(A)) end.
+
+flip(Fun) ->
+ fun(B, A) -> Fun(A, B) end.