blob: a25a59fd4ebb669eac1bbd08d40894c1501a88ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-module(gleam@generic).
-compile(no_auto_import).
-export([identity/1, always/2, flip/1, compose/2]).
identity(A) ->
A.
always(_, B) ->
B.
flip(Fun) ->
fun(B, A) -> Fun(A, B) end.
compose(Fun1, Fun2) ->
fun(A) -> Fun2(Fun1(A)) end.
|