Hoogle Search
Within LTS Haskell 24.5 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
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.fromList :: Ord k => [([k], v)] -> TreeMap k vtasty-autocollect Test.Tasty.AutoCollect.Utils.TreeMap Convert the given list of values into a TreeMap. For example, fromList [[A, B, C], [A, B], [A, C, D], [Z]] would become TreeMap { value = Nothing , children = Map.fromList [ (A, TreeMap { value = Nothing , children = Map.fromList [ (B, TreeMap { value = Just ... , children = Map.fromList (C, [ TreeMap { value = Just ... , children = Map.empty } ]) }) , (C, TreeMap { value = Nothing , children = Map.fromList [ (D, TreeMap { value = Just ... , children = Map.empty }) ] }) ] }) , (Z, TreeMap { value = Just ... , children = Map.empty }) ] }
-
tidal Sound.Tidal.Boot Turns a list of values into a pattern, playing one of them per cycle. The following are equivalent:
d1 $ n (fromList [0, 1, 2]) # s "superpiano" d1 $ n "<0 1 2>" # s "superpiano"