aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiacomo Cavalieri <giacomo.cavalieri@icloud.com>2023-06-24 13:00:02 +0200
committerLouis Pilfold <louis@lpil.uk>2023-06-24 12:04:38 +0100
commit1b52b08098c63fdd4981096dbc0de88071214edf (patch)
treef32951aec97f305efcc9d026b483ed3e31b2fcb7 /src
parent26271b6c8165854ddc2d959c7eaf070a6c14da1f (diff)
downloadgleam_stdlib-1b52b08098c63fdd4981096dbc0de88071214edf.tar.gz
gleam_stdlib-1b52b08098c63fdd4981096dbc0de88071214edf.zip
Revert "Add `list.map3`"
This reverts commit c228035cb43bc72da6b68c3b9067c314046279e9.
Diffstat (limited to 'src')
-rw-r--r--src/gleam/list.gleam27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index dce703b..b1acb74 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -412,33 +412,6 @@ fn do_map2(
}
}
-/// Combines three lists into a single list using the given function.
-///
-/// If a list is longer than the others the extra elements are dropped.
-///
-pub fn map3(
- list1: List(a),
- list2: List(b),
- list3: List(c),
- with fun: fn(a, b, c) -> d,
-) -> List(d) {
- do_map3(list1, list2, list3, fun, [])
-}
-
-fn do_map3(
- list1: List(a),
- list2: List(b),
- list3: List(c),
- fun: fn(a, b, c) -> d,
- acc: List(d),
-) -> List(d) {
- case list1, list2, list3 {
- [], _, _ | _, [], _ | _, _, [] -> reverse(acc)
- [a, ..as_], [b, ..bs], [c, ..cs] ->
- do_map3(as_, bs, cs, fun, [fun(a, b, c), ..acc])
- }
-}
-
/// Similar to `map` but also lets you pass around an accumulated value.
///
/// ## Examples