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]

    verset Verset

    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. zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

    xmonad-contrib XMonad.Config.Prime

    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"]
    

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

    xmonad-contrib XMonad.Prelude

    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"]
    

  4. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    base Prelude

    Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

    Example

    >>> liftA2 (,) (Just 3) (Just 5)
    Just (3,5)
    
    >>> liftA2 (+) [1, 2, 3] [4, 5, 6]
    [5,6,7,6,7,8,7,8,9]
    

  5. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    base Control.Applicative

    Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

    Example

    >>> liftA2 (,) (Just 3) (Just 5)
    Just (3,5)
    
    >>> liftA2 (+) [1, 2, 3] [4, 5, 6]
    [5,6,7,6,7,8,7,8,9]
    

  6. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    base GHC.Base

    Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

    Example

    >>> liftA2 (,) (Just 3) (Just 5)
    Just (3,5)
    
    >>> liftA2 (+) [1, 2, 3] [4, 5, 6]
    [5,6,7,6,7,8,7,8,9]
    

  7. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    hedgehog Hedgehog.Internal.Prelude

    Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

    Example

    >>> liftA2 (,) (Just 3) (Just 5)
    Just (3,5)
    
    >>> liftA2 (+) [1, 2, 3] [4, 5, 6]
    [5,6,7,6,7,8,7,8,9]
    

  8. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    ghc GHC.HsToCore.Monad

    No documentation available.

  9. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    ghc GHC.Prelude.Basic

    No documentation available.

  10. liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

    ghc GHC.Utils.Monad

    No documentation available.

Page 5 of many | Previous | Next