diff options
Diffstat (limited to 'gen/src')
-rw-r--r-- | gen/src/gleam@any.erl | 5 | ||||
-rw-r--r-- | gen/src/gleam@pair.erl | 20 | ||||
-rw-r--r-- | gen/src/gleam@triple.erl | 16 |
3 files changed, 11 insertions, 30 deletions
diff --git a/gen/src/gleam@any.erl b/gen/src/gleam@any.erl index 9f2a8e6..2cedd83 100644 --- a/gen/src/gleam@any.erl +++ b/gen/src/gleam@any.erl @@ -1,7 +1,7 @@ -module(gleam@any). -compile(no_auto_import). --export([from/1, unsafe_coerce/1, string/1, int/1, float/1, atom/1, bool/1, thunk/1, list/2, pair/1, field/2]). +-export([from/1, unsafe_coerce/1, string/1, int/1, float/1, atom/1, bool/1, thunk/1, list/2, field/2]). from(A) -> gleam_stdlib:identity(A). @@ -36,8 +36,5 @@ list(Any, DecoderType) -> fun(Capture1) -> gleam@list:traverse(Capture1, DecoderType) end ). -pair(A) -> - gleam_stdlib:decode_pair(A). - field(A, B) -> gleam_stdlib:decode_field(A, B). diff --git a/gen/src/gleam@pair.erl b/gen/src/gleam@pair.erl index 0f8e8be..3c07918 100644 --- a/gen/src/gleam@pair.erl +++ b/gen/src/gleam@pair.erl @@ -3,22 +3,22 @@ -export([first/1, second/1, swap/1, map_first/2, map_second/2]). -first(Tup) -> - {A, _} = Tup, +first(Pair) -> + {A, _} = Pair, A. -second(Tup) -> - {_, A} = Tup, +second(Pair) -> + {_, A} = Pair, A. -swap(Tup) -> - {A, B} = Tup, +swap(Pair) -> + {A, B} = Pair, {B, A}. -map_first(Tup, Fun) -> - {A, B} = Tup, +map_first(Pair, Fun) -> + {A, B} = Pair, {Fun(A), B}. -map_second(Tup, Fun) -> - {A, B} = Tup, +map_second(Pair, Fun) -> + {A, B} = Pair, {A, Fun(B)}. diff --git a/gen/src/gleam@triple.erl b/gen/src/gleam@triple.erl deleted file mode 100644 index 62a32da..0000000 --- a/gen/src/gleam@triple.erl +++ /dev/null @@ -1,16 +0,0 @@ --module(gleam@triple). --compile(no_auto_import). - --export([first/1, second/1, third/1]). - -first(Trip) -> - {A, _, _} = Trip, - A. - -second(Trip) -> - {_, A, _} = Trip, - A. - -third(Trip) -> - {_, _, A} = Trip, - A. |