Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. fromList :: forall (f :: Type -> Type) (n :: Nat) a . (CFreeMonoid f, Dom f a) => SNat n -> [a] -> Maybe (Sized f n a)

    sized Data.Sized

    If the given list is shorter than n, then returns Nothing Otherwise returns Sized f n a consisting of initial n element of given list. Since 0.7.0.0 (type changed)

  2. fromList :: [a] -> Fix (ListF a)

    srtree Data.SRTree.Recursion

    No documentation available.

  3. fromList :: Ord k => [(Bound k, v)] -> v -> SF k v

    step-function Data.Function.Step

    Create function from list of cases and default value.

    >>> let f = fromList [(Open 1,2),(Closed 3,4),(Open 4,5)] 6
    
    >>> putSF f
    \x -> if
    | x <  1    -> 2
    | x <= 3    -> 4
    | x <  4    -> 5
    | otherwise -> 6
    
    >>> map (f !) [0..10]
    [2,4,4,4,6,6,6,6,6,6,6]
    

  4. fromList :: Ord k => [(k, v)] -> v -> SF k v

    step-function Data.Function.Step.Discrete.Closed

    Create function from list of cases and default value.

    >>> let f = fromList [(1,2),(3,4)] 5
    
    >>> putSF f
    \x -> if
    | x <= 1    -> 2
    | x <= 3    -> 4
    | otherwise -> 5
    
    >>> map (f !) [0..10]
    [2,2,4,4,5,5,5,5,5,5,5]
    

  5. fromList :: Ord k => [(k, v)] -> v -> SF k v

    step-function Data.Function.Step.Discrete.Open

    Create function from list of cases and default value.

    >>> putSF $ fromList [(1,2),(3,4)] 5
    \x -> if
    | x < 1     -> 2
    | x < 3     -> 4
    | otherwise -> 5
    
    >>> map (fromList [(1,2),(3,4)] 5 !) [0..10]
    [2,4,4,5,5,5,5,5,5,5,5]
    

  6. fromList :: Unbox a => [a] -> Array a

    streamly Streamly.Data.Array.Foreign

    Create an Array from a list. The list must be of finite size.

  7. fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    fromList = foldr cons nil
    
    Construct a stream from a list of pure values. This is more efficient than fromFoldable for serial streams.

  8. fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    fromList = foldr cons nil
    
    Construct a stream from a list of pure values. This is more efficient than fromFoldable for serial streams.

  9. fromList :: IsList l => [Item l] -> l

    streamly Streamly.Internal.Data.Stream.Serial

    The fromList function constructs the structure l from the given list of Item l

  10. fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m a

    streamly Streamly.Prelude

    fromList = foldr cons nil
    
    Construct a stream from a list of pure values. This is more efficient than fromFoldable for serial streams.

Page 34 of many | Previous | Next