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.
-
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)
fromList :: [a] -> Fix (ListF a)srtree Data.SRTree.Recursion No documentation available.
fromList :: Ord k => [(Bound k, v)] -> v -> SF k vstep-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]
fromList :: Ord k => [(k, v)] -> v -> SF k vstep-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]
fromList :: Ord k => [(k, v)] -> v -> SF k vstep-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]
fromList :: Unbox a => [a] -> Array astreamly Streamly.Data.Array.Foreign Create an Array from a list. The list must be of finite size.
fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m astreamly 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.fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m astreamly 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.fromList :: IsList l => [Item l] -> lstreamly Streamly.Internal.Data.Stream.Serial The fromList function constructs the structure l from the given list of Item l
fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m astreamly Streamly.Prelude fromList = foldr cons nil
Construct a stream from a list of pure values. This is more efficient than fromFoldable for serial streams.