HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduleunicode-data-0.9.0Haskell2010

Unicode.Internal.Unfold

  • 2 types
  • 1 value
datadata Unfold a b
#

An Unfold a b is a generator of a stream of values of type b from a seed of type a.

Constructors

datadata Step s a
#

A stream is a succession of Steps.

Constructors

  • Yield !a !s

    Produces a single value and the next state of the stream.

  • Stop

    Indicates there are no more values in the stream.

Instances1Functor
  • Functor (Step s)Defined in unicode-data-0.9.0 · Unicode.Internal.Unfold
valuetoList :: Unfold a a -> a -> [a]
#

Convert an 'Unfold a a' to a list [a], if the resulting list is empty the seed is used as a default output.