diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-06-25 22:48:07 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-06-25 22:48:07 +0100 |
commit | 2c2541750ca4b7b604070c75c18d84be833c97d5 (patch) | |
tree | f5e63d941a1c7e2c2d4dff1d81c43fa2766308ae /src/std/tuple.gleam | |
parent | 96c20b8ebf8420fbba75c97fa08eaeb34e8dc394 (diff) | |
download | gleam_stdlib-2c2541750ca4b7b604070c75c18d84be833c97d5.tar.gz gleam_stdlib-2c2541750ca4b7b604070c75c18d84be833c97d5.zip |
stdlib namespace std -> gleam
Diffstat (limited to 'src/std/tuple.gleam')
-rw-r--r-- | src/std/tuple.gleam | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/std/tuple.gleam b/src/std/tuple.gleam deleted file mode 100644 index ab38a74..0000000 --- a/src/std/tuple.gleam +++ /dev/null @@ -1,29 +0,0 @@ -import std/list - -pub fn new(a, b) { - {a, b} -} - -pub fn first(tup) { - let {a, _} = tup - a -} - -pub fn second(tup) { - let {_, a} = tup - a -} - -pub fn swap(tup) { - let {a, b} = tup - {b, a} -} - -pub fn fetch(haystack, needle) { - list:find(haystack, fn(tuple) { - case first(tuple) == needle { - | True -> tuple |> second |> Ok - | False -> Error([]) - } - }) -} |