ListTools

cartesianProduct : List (List a) -> List (List a)

cartesianProduct2 : List a, List b -> List ( a, b )

combinations2 : List a -> List (List a)

count : List a -> Dict a U64 where a implements Eq & Hash

enumerate : List a -> List ( U64, a )

enumerateStartAt : List a, I64 -> List ( I64, a )

headTail : List a -> Result ( a, List a ) [ListWasEmpty]

map5 : List a, List b, List c, List d, List e, (a, b, c, d, e -> f) -> List f

Run a transformation function on the first element of each list, and use that as the first element in the returned list. Repeat until a list runs out of elements.

fn = \a, _, _, _, _ -> a
expect map5 [1, 2, 3, 4] ["A", "B", "C"] [5, 5, 5] ['A', 'B', 'C', 'D', 'E'] [10.0, 15.0, 20.0, 25.0] fn == [1, 2, 3]

max : List (Num a) -> Result (Num a) [ListWasEmpty]

maxIndex : List (Num a) -> Result ( U64, Num a ) [ListWasEmpty]

maxWithDefault : List (Num a), Num a -> Num a

maxIndexWithDefault : List (Num a), U64, Num a -> ( U64, Num a )

maxWithKey : List (Num a), (Num a -> Num *) -> Result (Num a) [ListWasEmpty]

mode : List a -> Result a [ListWasEmpty] where a implements Eq & Hash

slice : List elem, U64, U64 -> List elem

splitAt : List a, U64 -> ( List a, List a )

zip : List (List a) -> List (List a)

zip2 : List a, List b -> List ( a, b )

zip3 : List a, List b, List c -> List ( a, b, c )

zip4 : List a, List b, List c, List d -> List ( a, b, c, d )

zip5 : List a, List b, List c, List d, List e -> List ( a, b, c, d, e )