HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleunicode-data-0.4.0.1Haskell2010

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