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.

  1. 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]
    

  2. 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]
    

  3. 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]
    

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

    streamly Streamly.Data.Array.Foreign

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

  5. 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.

  6. 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.

  7. 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

  8. 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.

  9. fromList :: Ord k => [([k], v)] -> TreeMap k v

    tasty-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 }) ] }

  10. fromList :: [a] -> Pattern a

    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"
    

Page 34 of many | Previous | Next