Hoogle Search

Within LTS Haskell 24.35 (ghc-9.10.3)

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

  1. enumerateFromThenTo :: forall t (m :: Type -> Type) . (Enumerable a, IsStream t, Monad m) => a -> a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFromThenTo from then to generates a finite stream whose first element is from, the second element is then and the successive elements are in increments of then - from up to to. Enumeration can occur downwards or upwards depending on whether then comes before or after from.

    >>> Stream.toList $ Stream.enumerateFromThenTo 0 2 6
    [0,2,4,6]
    
    >>> Stream.toList $ Stream.enumerateFromThenTo 0 (-2) (-6)
    [0,-2,-4,-6]
    

  2. enumerateFromThenToFractional :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Fractional a, Ord a) => a -> a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Numerically stable enumeration from a Fractional number in steps up to a given limit. enumerateFromThenToFractional from then to generates a finite stream whose first element is from, the second element is then and the successive elements are in increments of then - from up to to. This is the equivalent of enumFromThenTo for Fractional types. For example:

    >>> Stream.toList $ Stream.enumerateFromThenToFractional 0.1 2 6
    [0.1,2.0,3.9,5.799999999999999]
    
    >>> Stream.toList $ Stream.enumerateFromThenToFractional 0.1 (-2) (-6)
    [0.1,-2.0,-4.1000000000000005,-6.200000000000001]
    

  3. enumerateFromThenToIntegral :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Integral a) => a -> a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Enumerate an Integral type in steps up to a given limit. enumerateFromThenToIntegral from then to generates a finite stream whose first element is from, the second element is then and the successive elements are in increments of then - from up to to.

    >>> Stream.toList $ Stream.enumerateFromThenToIntegral 0 2 6
    [0,2,4,6]
    
    >>> Stream.toList $ Stream.enumerateFromThenToIntegral 0 (-2) (-6)
    [0,-2,-4,-6]
    

  4. enumerateFromThenToSmall :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Enum a) => a -> a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFromThenTo for Enum types not larger than Int.

  5. enumerateFromTo :: forall t (m :: Type -> Type) . (Enumerable a, IsStream t, Monad m) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Generate a finite stream starting with the element from, enumerating the type up to the value to. If to is smaller than from then an empty stream is returned.

    >>> Stream.toList $ Stream.enumerateFromTo 0 4
    [0,1,2,3,4]
    
    For Fractional types, the last element is equal to the specified to value after rounding to the nearest integral value.
    >>> Stream.toList $ Stream.enumerateFromTo 1.1 4
    [1.1,2.1,3.1,4.1]
    
    >>> Stream.toList $ Stream.enumerateFromTo 1.1 4.6
    [1.1,2.1,3.1,4.1,5.1]
    

  6. enumerateFromTo :: forall t (m :: Type -> Type) . (Enumerable a, IsStream t, Monad m) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Generate a finite stream starting with the element from, enumerating the type up to the value to. If to is smaller than from then an empty stream is returned.

    >>> Stream.toList $ Stream.enumerateFromTo 0 4
    [0,1,2,3,4]
    
    For Fractional types, the last element is equal to the specified to value after rounding to the nearest integral value.
    >>> Stream.toList $ Stream.enumerateFromTo 1.1 4
    [1.1,2.1,3.1,4.1]
    
    >>> Stream.toList $ Stream.enumerateFromTo 1.1 4.6
    [1.1,2.1,3.1,4.1,5.1]
    

  7. enumerateFromToFractional :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Fractional a, Ord a) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Numerically stable enumeration from a Fractional number to a given limit. enumerateFromToFractional from to generates a finite stream whose first element is from and successive elements are in increments of 1 up to to. This is the equivalent of enumFromTo for Fractional types. For example:

    >>> Stream.toList $ Stream.enumerateFromToFractional 1.1 4
    [1.1,2.1,3.1,4.1]
    
    >>> Stream.toList $ Stream.enumerateFromToFractional 1.1 4.6
    [1.1,2.1,3.1,4.1,5.1]
    
    Notice that the last element is equal to the specified to value after rounding to the nearest integer.

  8. enumerateFromToIntegral :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Integral a) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Enumerate an Integral type up to a given limit. enumerateFromToIntegral from to generates a finite stream whose first element is from and successive elements are in increments of 1 up to to.

    >>> Stream.toList $ Stream.enumerateFromToIntegral 0 4
    [0,1,2,3,4]
    

  9. enumerateFromToSmall :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Enum a) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFromTo for Enum types not larger than Int.

  10. enumerateTo :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Bounded a, Enumerable a) => a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateTo = enumerateFromTo minBound
    
    Enumerate a Bounded type from its minBound to specified value.

Page 83 of many | Previous | Next