@@ -23,6 +23,15 @@ list must have the same type.
25@docs sort, sortBy, sortWith
25@docs sort, sortBy, sortWith
28+@docs zip3, zip4, zip5, zipWith3, zipWith4, zipWith5
30+If you can think of a legitimate use of `zipN` or `zipWithN` where `N` is 6 or
31+more, please let us know on [the
32+list](https://groups.google.com/forum/#!forum/elm-discuss). The current
33+sentiment is that it is already quite error prone once you get to 4 and
34+possibly should be approached another way.
28import Basics (..)
37import Basics (..)
@@ -186,6 +195,15 @@ If one list is longer, the extra elements are dropped.
186zip : [a] -> [b] -> [(a,b)]
195zip : [a] -> [b] -> [(a,b)]
187zip = Native.List.zip
196zip = Native.List.zip
198+zip3 : [a] -> [b] -> [c] -> [(a,b,c)]
199+zip3 = Native.List.zipWith3 (,,)
201+zip4 : [a] -> [b] -> [c] -> [d] -> [(a,b,c,d)]
202+zip4 = Native.List.zipWith4 (,,,)
204+zip5 : [a] -> [b] -> [c] -> [d] -> [e] -> [(a,b,c,d,e)]
205+zip5 = Native.List.zipWith5 (,,,,)
189{-| Combine two lists, combining them with the given function.
207{-| Combine two lists, combining them with the given function.
190If one list is longer, the extra elements are dropped.
208If one list is longer, the extra elements are dropped.
@@ -194,6 +212,15 @@ If one list is longer, the extra elements are dropped.
194zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
212zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
195zipWith = Native.List.zipWith
213zipWith = Native.List.zipWith
215+zipWith3 : (a -> b -> c -> x) -> [a] -> [b] -> [c] -> [x]
216+zipWith3 = Native.List.zipWith3
218+zipWith4 : (a -> b -> c -> d -> x) -> [a] -> [b] -> [c] -> [d] -> [x]
219+zipWith4 = Native.List.zipWith4
221+zipWith5 : (a -> b -> c -> d -> e -> x) -> [a] -> [b] -> [c] -> [d] -> [e] -> [x]
222+zipWith5 = Native.List.zipWith5
197{-| Decompose a list of tuples.
224{-| Decompose a list of tuples.
199 unzip [(0, True), (17, False), (1337, True)] == ([0,17,1337], [True,False,True])
226 unzip [(0, True), (17, False), (1337, True)] == ([0,17,1337], [True,False,True])