aboutsummaryrefslogtreecommitdiff
path: root/src/std/tuple.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'src/std/tuple.gleam')
-rw-r--r--src/std/tuple.gleam29
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([])
- }
- })
-}