f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~portable provisionalEdward Kmett <ekmett@gmail.com>NoneExtract the focused element )Move the head of the zipper to the right (Move the head of the zipper to the left KCons before the head of the zipper. The head now points to the new element UMove the head of the zipper one step to the right, returning the value we move over. Interleave two Zippers xs and ys, alternating elements  from each list. ; [x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...]  interleave = (<>)   y xs" creates an alternating stream of  elements from xs and y.  4 computes the transposition of a stream of streams.   n xs drops the first n elements off the front of  the sequence xs.  n xs- returns a pair consisting of the prefix of  xs of length n1 and the remaining stream immediately following  this prefix. Beware8: passing a negative integer as the first argument will 0 cause an error if you access the taken portion  p xs* returns the longest prefix of the stream  xs for which the predicate p holds.  p xs$ returns the suffix remaining after   p xs. Beware0: this function may diverge if every element of xs  satisfies p, e.g. dropWhile even (repeat 0) will loop.  p xs returns the longest prefix of xs that satisfies  p-, together with the remainder of the stream. The  p function is equivalent to  not . p. The isPrefix function returns True if the first argument is  a prefix of the second. xs !! n# returns the element of the stream xs at index  n0. Note that the head of the stream has index 0. Beware>: passing a negative integer as the first argument will cause  an error. The 5 function takes a predicate and a stream and returns L the index of the first element in the stream that satisfies the predicate, Beware:  p xs) will diverge if none of the elements of  xs satisfy p. /Internal helper, used to find an index in the The 1 function returns the index of the first element ( in the given stream which is equal (by ) to the query element, Beware:  x xs& will diverge if none of the elements  of xs equal x. The 2 function takes two streams and returns a list of  corresponding pairs.  zip = liftA2 (,) The  function generalizes . Rather than tupling = the functions, the elements are combined using the function ! passed as the first argument to .  zipWith = liftA2 The  function is the inverse of the  function. #   " portable provisionalEdward Kmett <ekmett@gmail.com>None O(1) cons !O(1) "O(1). $O(1). %O(log n). &O(log n). 'O(log n). ; !"#$%&'()*+,-./01 !"#$%&'()*+,-./01 &!"#$%'()*+,./01-8 !"#$%&'()*+,-./01portable (Haskell 2010) provisionalEdward Kmett <ekmett@gmail.com>None(4"Map a pure function over a stream 5+Extract the first element of the sequence. 67Extract the sequence following the head of the stream. 7The 7 function takes a stream xs and returns all the  suffixes of xs. 88 x3 returns a constant stream, where all elements are  equal to x. 9=The unfold function is similar to the unfold for lists. Note 6 there is no base case: all streams must be infinite. :Interleave two Streams xs and ys, alternating elements  from each list. ; [x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...] ;The ; function takes a stream xs and returns all the  finite prefixes of xs. Note that this ; is lazier then Data.List.inits:   inits _|_ = [] ::: _|_  while for Data.List.inits:  inits _|_ = _|_ << y xs" creates an alternating stream of  elements from xs and y. ==4 yields a stream of successive reduced values from: B scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] >=4 yields a stream of successive reduced values from: B scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] ?? is a variant of =& that has no starting value argument: 0 scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...] @scanl1' is a strict = that has no starting value. AA4 computes the transposition of a stream of streams. BB f x produces the infinite sequence  of repeated applications of f to x. % iterate f x = [x, f x, f (f x), ..] CC xs$ returns the infinite repetition of xs: < cycle [1,2,3] = Cons 1 (Cons 2 (Cons 3 (Cons 1 (Cons 2 ... DD n xs returns the first n elements of xs. Beware8: passing a negative integer as the first argument will  cause an error. EE n xs drops the first n elements off the front of  the sequence xs. Beware8: passing a negative integer as the first argument will  cause an error. FF n xs- returns a pair consisting of the prefix of  xs of length n1 and the remaining stream immediately following  this prefix. Beware8: passing a negative integer as the first argument will  cause an error. GG p xs* returns the longest prefix of the stream  xs for which the predicate p holds. HH p xs$ returns the suffix remaining after  G p xs. Beware0: this function may diverge if every element of xs  satisfies p, e.g. dropWhile even (repeat 0) will loop. II p xs returns the longest prefix of xs that satisfies  p-, together with the remainder of the stream. JThe J p function is equivalent to I not . p. KK p xs, removes any elements from xs that do not satisfy p. Beware6: this function may diverge if there is no element of  xs that satisfies p, e.g. filter odd (repeat 0) will loop. LThe L function takes a predicate p and a stream  xs>, and returns a pair of streams. The first stream corresponds  to the elements of xs for which p holds; the second stream  corresponds to the elements of xs for which p does not hold. Beware9: One of the elements of the tuple may be undefined. For  example, +fst (partition even (repeat 0)) == repeat 0 ; on the  other hand snd (partition even (repeat 0)) is undefined. MThe M1 function takes a stream and returns a stream of A lists such that flattening the resulting stream is equal to the ; argument. Moreover, each sublist in the resulting stream - contains only equal elements. For example, v group $ cycle "Mississippi" = "M" ::: "i" ::: "ss" ::: "i" ::: "ss" ::: "i" ::: "pp" ::: "i" ::: "M" ::: "i" ::: ... OThe isPrefix function returns True if the first argument is  a prefix of the second. Pxs !! n# returns the element of the stream xs at index  n0. Note that the head of the stream has index 0. Beware>: passing a negative integer as the first argument will cause  an error. QThe Q1 function returns the index of the first element ( in the given stream which is equal (by ) to the query element, Beware: Q x xs& will diverge if none of the elements  of xs equal x. RThe R function extends Q, by returning the I indices of all elements equal to the query element, in ascending order. Beware: R x xs will diverge if any suffix of  xs does not contain x. SThe S5 function takes a predicate and a stream and returns L the index of the first element in the stream that satisfies the predicate, Beware: S p xs) will diverge if none of the elements of  xs satisfy p. TThe T function extends S, by returning the @ indices of all elements satisfying the predicate, in ascending  order. Beware: T p xs" will diverge if all the elements  of any suffix of xs fails to satisfy p. UThe U2 function takes two streams and returns a list of  corresponding pairs. VThe V function generalizes U. Rather than tupling = the functions, the elements are combined using the function ! passed as the first argument to V. WThe W function is the inverse of the U function. XThe X/ function breaks a stream of characters into a 7 stream of words, which were delimited by white space. Beware: if the stream of characters xs does not contain white  space, accessing the tail of words xs will loop. YThe Y% function is an inverse operation to X. It % joins words with separating spaces. ZThe Z4 function breaks a stream of characters into a list @ of strings at newline characters. The resulting strings do not  contain newlines. Beware: if the stream of characters xs does not contain + newline characters, accessing the tail of lines xs will loop. [The [% function is an inverse operation to Z. It = joins lines, after appending a terminating newline to each. \The \ converts an infinite list to a  stream. Beware.: Passing a finite list, will cause an error. 823456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\+23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\+2356;74<:=>?@AB8C9DEFGHIJKLMNOPQRSTUVWXYZ[\723456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\portable provisionalEdward Kmett <ekmett@gmail.com>None]^_`abcdefghijk]^_`abcdefghijk]`bcade^_fghijk]^_`abcdefghijkportable provisionalEdward Kmett <ekmett@gmail.com>None pO(log n) O(1) sO(log n). tO(1) cons vO(1) wO(1). yO(log n). zO(1). {O(log n). |O(log n). =lmnopqrstuvwxyz{|}~lmnopqrstuvwxyz{|}~lnmtusvwxyz{|}qr~op9lnmopqrstuvwxyz{|}~portable provisionalEdward Kmett <ekmett@gmail.com>None       !"#$%&' ()*+,-./0#12 ($3456789:;<=>?@ !"ABCD,EFGHIJKLM*NOPQRSTU$V&'WX (Y)*+,Z-./0STUX W(2)[\]^$_`abcdefTghijklmnopqrstuvwxyz{|}~tsvxwy{|}~uEghijklmnopqr streams-3.0&Data.Stream.Infinite.Functional.ZipperData.Stream.Infinite.SkewData.Stream.InfiniteData.Stream.SupplyData.Stream.Future.SkewData.Stream.FuturebaseGHC.ListreverseZipper:~ toSequenceheadtailuntail<|uncons interleave intersperse transposetakedropsplitAt takeWhile dropWhilespanbreak isPrefixOf!! findIndex elemIndexzipzipWithunzipStreamrepeattabulateindexedfromtailsindexsplitsplitWfromListinsertinsertByadjustupdate:>mapunfoldinitsscanlscanl'scanl1scanl1'iteratecyclefilter partitiongroupgroupBy elemIndices findIndiceswordsunwordslinesunlinesSupply leftSupply rightSupply newSupplynewDupableSupply newEnumSupply newNumSupplynewDupableEnumSupplynewDupableNumSupplysplits splitSkewsplit2split3split4Future:<Last replicatelengthconslasttoFuture findIndex'ghc-prim GHC.Classes==$fSemigroupZipper $fMonadZipper$fApplicativeZipper$fComonadApplyZipper $fApplyZipper$fComonadZipper$fExtendZipper$fFunctorZipperCompleteBinTipbinweighttoList mapWithIndex indexComplete dropComplete splitCompletesplitCompleteWadjustComplete $fMonadStream$fSemigroupStream$fDistributiveStream$fTraversable1Stream$fTraversableStream$fFoldable1Stream$fFoldableStream $fAltStream$fApplicativeStream$fComonadApplyStream $fApplyStream$fComonadStream$fExtendStream$fFunctorStream $fShowStream$fTraversable1Complete$fTraversableComplete$fFoldable1Complete$fFoldableComplete$fComonadComplete$fExtendComplete$fFunctorComplete$fTraversable1Supply$fTraversableSupply$fFoldable1Supply$fFoldableSupply$fApplicativeSupply $fApplySupply$fComonadSupply$fExtendSupply$fFunctorSupply singleton extendTree$fTraversable1Future$fTraversableFuture$fFoldable1Future$fFoldableFuture $fAltFuture$fApplicativeFuture$fComonadApplyFuture $fApplyFuture$fComonadFuture$fExtendFuture$fFunctorFuture $fShowFuture$fSemigroupFuture