/usr/share/doc/libghc-text-doc/html/Data-Text-Internal-Fusion.html is in libghc-text-doc 1.2.2.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Text.Internal.Fusion</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Text-Internal-Fusion.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Text-Internal-Fusion.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">text-1.2.2.1: An efficient packed Unicode text type.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) Tom Harper 2008-2009,
(c) Bryan O'Sullivan 2009-2010,
(c) Duncan Coutts 2009</td></tr><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>GHC</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Text.Internal.Fusion</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types</a></li><li><a href="#g:2">Creation and elimination</a></li><li><a href="#g:3">Transformations</a></li><li><a href="#g:4">Construction</a><ul><li><a href="#g:5">Scans</a></li><li><a href="#g:6">Accumulating maps</a></li><li><a href="#g:7">Generation and unfolding</a></li></ul></li><li><a href="#g:8">Indexing</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p><em>Warning</em>: 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!</p><p>Text manipulation functions represented as fusible operations over
streams.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Stream">Stream</a> a = <a href="#v:Stream">Stream</a> (s -> <a href="Data-Text-Internal-Fusion.html#t:Step">Step</a> s a) !s !<a href="Data-Text-Internal-Fusion-Size.html#t:Size">Size</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Step">Step</a> s a<ul class="subs"><li>= <a href="#v:Done">Done</a></li><li>| <a href="#v:Skip">Skip</a> !s</li><li>| <a href="#v:Yield">Yield</a> !a !s</li></ul></li><li class="src short"><a href="#v:stream">stream</a> :: <a href="Data-Text.html#t:Text">Text</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:unstream">unstream</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:reverseStream">reverseStream</a> :: <a href="Data-Text.html#t:Text">Text</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:length">length</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:reverse">reverse</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:reverseScanr">reverseScanr</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:mapAccumL">mapAccumL</a> :: (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> (a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a>)) -> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> (a, <a href="Data-Text.html#t:Text">Text</a>)</li><li class="src short"><a href="#v:unfoldrN">unfoldrN</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a>, a)) -> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:index">index</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:findIndex">findIndex</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:countChar">countChar</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li></ul></div><div id="interface"><h1 id="g:1">Types</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Stream" class="def">Stream</a> a <a href="src/Data-Text-Internal-Fusion-Types.html#Stream" class="link">Source</a> <a href="#t:Stream" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Stream" class="def">Stream</a> (s -> <a href="Data-Text-Internal-Fusion.html#t:Step">Step</a> s a) !s !<a href="Data-Text-Internal-Fusion-Size.html#t:Size">Size</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Stream" class="caption collapser" onclick="toggleSection('i:Stream')">Instances</p><div id="section.i:Stream" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Stream:Eq:1" class="instance expander" onclick="toggleSection('i:id:Stream:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a)</span> <a href="src/Data-Text-Internal-Fusion-Types.html#line-65" class="link">Source</a> <a href="#t:Stream" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Stream:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Stream:Ord:2" class="instance expander" onclick="toggleSection('i:id:Stream:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a)</span> <a href="src/Data-Text-Internal-Fusion-Types.html#line-68" class="link">Source</a> <a href="#t:Stream" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Stream:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> a <a href="#v:min" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Step" class="def">Step</a> s a <a href="src/Data-Text-Internal-Fusion-Types.html#Step" class="link">Source</a> <a href="#t:Step" class="selflink">#</a></p><div class="doc"><p>Intermediate result in a processing pipeline.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Done" class="def">Done</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:Skip" class="def">Skip</a> !s</td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:Yield" class="def">Yield</a> !a !s</td><td class="doc empty"> </td></tr></table></div></div><h1 id="g:2">Creation and elimination</h1><div class="top"><p class="src"><a id="v:stream" class="def">stream</a> :: <a href="Data-Text.html#t:Text">Text</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion.html#stream" class="link">Source</a> <a href="#v:stream" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Convert a <code><a href="Data-Text.html#t:Text">Text</a></code> into a 'Stream Char'.</p></div></div><div class="top"><p class="src"><a id="v:unstream" class="def">unstream</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text.html#t:Text">Text</a> <a href="src/Data-Text-Internal-Fusion.html#unstream" class="link">Source</a> <a href="#v:unstream" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Convert a 'Stream Char' into a <code><a href="Data-Text.html#t:Text">Text</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:reverseStream" class="def">reverseStream</a> :: <a href="Data-Text.html#t:Text">Text</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion.html#reverseStream" class="link">Source</a> <a href="#v:reverseStream" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Convert a <code><a href="Data-Text.html#t:Text">Text</a></code> into a 'Stream Char', but iterate
backwards.</p></div></div><div class="top"><p class="src"><a id="v:length" class="def">length</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="src/Data-Text-Internal-Fusion.html#length" class="link">Source</a> <a href="#v:length" class="selflink">#</a></p></div><h1 id="g:3">Transformations</h1><div class="top"><p class="src"><a id="v:reverse" class="def">reverse</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text.html#t:Text">Text</a> <a href="src/Data-Text-Internal-Fusion.html#reverse" class="link">Source</a> <a href="#v:reverse" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Reverse the characters of a string.</p></div></div><h1 id="g:4">Construction</h1><h2 id="g:5">Scans</h2><div class="top"><p class="src"><a id="v:reverseScanr" class="def">reverseScanr</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion.html#reverseScanr" class="link">Source</a> <a href="#v:reverseScanr" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Perform the equivalent of <code>scanr</code> over a list, only with
the input and result reversed.</p></div></div><h2 id="g:6">Accumulating maps</h2><div class="top"><p class="src"><a id="v:mapAccumL" class="def">mapAccumL</a> :: (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> (a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a>)) -> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> (a, <a href="Data-Text.html#t:Text">Text</a>) <a href="src/Data-Text-Internal-Fusion.html#mapAccumL" class="link">Source</a> <a href="#v:mapAccumL" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Like a combination of <code>map</code> and <code>foldl'</code>. Applies a
function to each element of a <code><a href="Data-Text.html#t:Text">Text</a></code>, passing an accumulating
parameter from left to right, and returns a final <code><a href="Data-Text.html#t:Text">Text</a></code>.</p></div></div><h2 id="g:7">Generation and unfolding</h2><div class="top"><p class="src"><a id="v:unfoldrN" class="def">unfoldrN</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a>, a)) -> a -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion.html#unfoldrN" class="link">Source</a> <a href="#v:unfoldrN" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Like <code>unfoldr</code>, <code><a href="Data-Text-Internal-Fusion.html#v:unfoldrN">unfoldrN</a></code> builds a stream from a seed
value. However, the length of the result is limited by the
first argument to <code><a href="Data-Text-Internal-Fusion.html#v:unfoldrN">unfoldrN</a></code>. This function is more efficient than
<code>unfoldr</code> when the length of the result is known.</p></div></div><h1 id="g:8">Indexing</h1><div class="top"><p class="src"><a id="v:index" class="def">index</a> :: <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion.html#index" class="link">Source</a> <a href="#v:index" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> stream index (subscript) operator, starting from 0.</p></div></div><div class="top"><p class="src"><a id="v:findIndex" class="def">findIndex</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="src/Data-Text-Internal-Fusion.html#findIndex" class="link">Source</a> <a href="#v:findIndex" class="selflink">#</a></p><div class="doc"><p>The <code><a href="Data-Text-Internal-Fusion.html#v:findIndex">findIndex</a></code> function takes a predicate and a stream and
returns the index of the first element in the stream
satisfying the predicate.</p></div></div><div class="top"><p class="src"><a id="v:countChar" class="def">countChar</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="Data-Text-Internal-Fusion.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="src/Data-Text-Internal-Fusion.html#countChar" class="link">Source</a> <a href="#v:countChar" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> The <code>count</code> function returns the number of times the query
element appears in the given stream.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|