Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

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

  1. enumerateFromThenToSmall :: forall (m :: Type -> Type) a . (Monad m, Enum a) => a -> a -> a -> Stream m a

    streamly-core Streamly.Internal.Data.Stream

    enumerateFromThenTo for Enum types not larger than Int.

  2. enumerateFromTo :: forall (m :: Type -> Type) . (Enumerable a, Monad m) => a -> a -> Stream m a

    streamly-core Streamly.Internal.Data.Stream

    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]
    

  3. enumerateFromToFractional :: forall (m :: Type -> Type) a . (Monad m, Fractional a, Ord a) => a -> a -> Stream m a

    streamly-core Streamly.Internal.Data.Stream

    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.

  4. enumerateFromToIntegral :: forall (m :: Type -> Type) a . (Monad m, Integral a) => a -> a -> Stream m a

    streamly-core Streamly.Internal.Data.Stream

    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]
    

  5. enumerateFromToSmall :: forall (m :: Type -> Type) a . (Monad m, Enum a) => a -> a -> Stream m a

    streamly-core Streamly.Internal.Data.Stream

    enumerateFromTo for Enum types not larger than Int.

  6. enumerateTo :: forall (m :: Type -> Type) a . (Monad m, Bounded a, Enumerable a) => a -> Stream m a

    streamly-core Streamly.Internal.Data.Stream

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

  7. enumerateFrom :: forall (m :: Type -> Type) . (Enumerable a, Monad m) => Unfold m a a

    streamly-core Streamly.Internal.Data.Unfold

    Unfolds from generating a stream starting with the element from, enumerating up to maxBound when the type is Bounded or generating an infinite stream when the type is not Bounded.

    >>> Stream.toList $ Stream.take 4 $ Stream.unfold Unfold.enumerateFrom (0 :: Int)
    [0,1,2,3]
    
    For Fractional types, enumeration is numerically stable. However, no overflow or underflow checks are performed.
    >>> Stream.toList $ Stream.take 4 $ Stream.unfold Unfold.enumerateFrom 1.1
    [1.1,2.1,3.1,4.1]
    
    Pre-release

  8. enumerateFromFractional :: forall (m :: Type -> Type) a . (Monad m, Fractional a) => Unfold m a a

    streamly-core Streamly.Internal.Data.Unfold

    No documentation available.

  9. enumerateFromIntegral :: forall (m :: Type -> Type) a . (Monad m, Integral a) => Unfold m a a

    streamly-core Streamly.Internal.Data.Unfold

    No documentation available.

  10. enumerateFromIntegralBounded :: forall (m :: Type -> Type) a . (Monad m, Integral a, Bounded a) => Unfold m a a

    streamly-core Streamly.Internal.Data.Unfold

    No documentation available.

Page 72 of many | Previous | Next