HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletext-2.1.3Haskell2010

Data.Text.Internal.Lazy.Fusion

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Core stream fusion functionality for text.

  • 8 values
  • Packagetext-2.1.3
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceFusion.hs
valueunfoldrN :: Int64 -> (a -> Maybe (Char, a)) -> a -> Stream Char
#

O(n) Like unfoldr, unfoldrN builds a stream from a seed value. However, the length of the result is limited by the first argument to unfoldrN. This function is more efficient than unfoldr when the length of the result is known.

valuecountChar :: Char -> Stream Char -> Int64
#

O(n) The count function returns the number of times the query element appears in the given stream.