Hoogle Search

Within LTS Haskell 24.25 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    relude Relude.List.Reexport

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  2. cartesianProduct :: (a -> b -> c) -> [a] -> [b] -> [c]

    universe-base Data.Universe.Helpers

    Slightly unfair 2-way Cartesian product: given two (possibly infinite) lists, produce a single list such that whenever v and w have finite indices in the input lists, (v,w) has finite index in the output list. Lower indices occur as the fst part of the tuple more frequently, but not exponentially so.

  3. unfairCartesianProduct :: (a -> b -> c) -> [a] -> [b] -> [c]

    universe-base Data.Universe.Helpers

    Very unfair 2-way Cartesian product: same guarantee as the slightly unfair one, except that lower indices may occur as the fst part of the tuple exponentially more frequently.

  4. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    ghc-internal GHC.Internal.Data.List

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  5. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    ghc-internal GHC.Internal.Data.OldList

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  6. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    ghc-internal GHC.Internal.List

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  7. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    protolude Protolude

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  8. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    numeric-prelude NumericPrelude

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  9. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    numeric-prelude NumericPrelude.Base

    zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

    zipWith (,) xs ys == zip xs ys
    zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]
    
    zipWith is right-lazy:
    >>> let f = undefined
    
    >>> zipWith f [] undefined
    []
    
    zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

    Examples

    zipWith (+) can be applied to two lists to produce the list of corresponding sums:
    >>> zipWith (+) [1, 2, 3] [4, 5, 6]
    [5,7,9]
    
    >>> zipWith (++) ["hello ", "foo"] ["world!", "bar"]
    ["hello world!","foobar"]
    

  10. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    numeric-prelude NumericPrelude.List.Checked

    Zip two lists which must be of the same length. This is checked only lazily, that is unequal lengths are detected only if the list is evaluated completely. But it is more strict than zipWithPad undefined f since the latter one may succeed on unequal length list if f is lazy.

Page 2 of many | Previous | Next