‘      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(C) 2011 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy+3FExtract the focused element(Move the head of the zipper to the right'Move the head of the zipper to the leftJCons before the head of the zipper. The head now points to the new elementTMove 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. K[x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...] interleave = (<>)   y xs1 creates an alternating stream of elements from xs and y.  3 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 n= and the remaining stream immediately following this prefix.Bewareg: passing a negative integer as the first argument will 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 True2 if the first argument is a prefix of the second.xs !! n# returns the element of the stream xs at index n/. Note that the head of the stream has index 0.The  function takes a predicate and a stream and returns 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 theThe Y 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 G function takes two streams and returns a list of corresponding pairs. zip = liftA2 (,)The  function generalizes t. Rather than tupling the functions, the elements are combined using the function passed as the first argument to . zipWith = liftA2The  function is the inverse of the  function.#   " (C) 2011 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy +3=FKO(1) cons O(1)!O(1).#O(1).$O(log n).%O(log n).: !"#$%&'()*+,-./ !"#$%&'()*+,-./$ !"#%&'()*,-./+7 !"#$%&'()*+,-./S(C) 2011 Edward Kmett, (C) 2007-2010 Wouter Swierstra, Bas van Dijk BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable (Haskell 2010) Trustworthy+3=FK(2!Map a pure function over a stream3*Extract the first element of the sequence.46Extract the sequence following the head of the stream.5The 5 function takes a stream xs" and returns all the suffixes of xs.66 x= returns a constant stream, where all elements are equal to x.7rThe unfold function is similar to the unfold for lists. Note there is no base case: all streams must be infinite.8Interleave two Streams xs and ys', alternating elements from each list. 9[x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...]9The 9 function takes a stream xs) and returns all the finite prefixes of xs.Note that this 9 is lazier then Data.List.inits: inits _|_ = [] ::: _|_ while for Data.List.inits: inits _|_ = _|_:: y xs1 creates an alternating stream of elements from xs and y.;;3 yields a stream of successive reduced values from: @scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]<;3 yields a stream of successive reduced values from: @scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]== is a variant of ;% that has no starting value argument: .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]>scanl1' is a strict ; that has no starting value.??3 computes the transposition of a stream of streams.@@ f x= produces the infinite sequence of repeated applications of f to x. #iterate f x = [x, f x, f (f x), ..]AA xs$ returns the infinite repetition of xs: :cycle [1,2,3] = Cons 1 (Cons 2 (Cons 3 (Cons 1 (Cons 2 ...BB n xs returns the first n elements of xs.BewareH: passing a negative integer as the first argument will cause an error.CC n xs drops the first n) elements off the front of the sequence xs.BewareH: passing a negative integer as the first argument will cause an error.DD n xs- returns a pair consisting of the prefix of xs of length n= and the remaining stream immediately following this prefix.BewareH: passing a negative integer as the first argument will cause an error.EE p xs+ returns the longest prefix of the stream xs for which the predicate p holds.FF p xs% returns the suffix remaining after E p xs.Beware0: this function may diverge if every element of xs satisfies p, e.g. dropWhile even (repeat 0) will loop.GG p xs returns the longest prefix of xs that satisfies p,, together with the remainder of the stream.HThe H p function is equivalent to G not . p.II p xs, removes any elements from xs that do not satisfy p.Beware7: this function may diverge if there is no element of xs that satisfies p, e.g. filter odd (repeat 0) will loop.JThe J function takes a predicate p and a stream xsR, 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.BewareC: 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.KThe K function takes a stream and returns a stream of 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, tgroup $ cycle "Mississippi" = "M" ::: "i" ::: "ss" ::: "i" ::: "ss" ::: "i" ::: "pp" ::: "i" ::: "M" ::: "i" ::: ...MThe isPrefix function returns True2 if the first argument is a prefix of the second.Nxs !! n# returns the element of the stream xs at index n/. Note that the head of the stream has index 0.BewareH: passing a negative integer as the first argument will cause an error.OThe OY function returns the index of the first element in the given stream which is equal (by ) to the query element,Beware: O x xs* will diverge if none of the elements of xs equal x.PThe P function extends O[, by returning the indices of all elements equal to the query element, in ascending order.Beware: P x xs will diverge if any suffix of xs does not contain x.QThe Q function takes a predicate and a stream and returns the index of the first element in the stream that satisfies the predicate,Beware: Q p xs* will diverge if none of the elements of xs satisfy p.RThe R function extends QZ, by returning the indices of all elements satisfying the predicate, in ascending order.Beware: R p xs4 will diverge if all the elements of any suffix of xs fails to satisfy p.SThe SG function takes two streams and returns a list of corresponding pairs.TThe T function generalizes St. Rather than tupling the functions, the elements are combined using the function passed as the first argument to T.UThe U function is the inverse of the S function.VThe Ve function breaks a stream of characters into a stream of words, which were delimited by white space.Beware: if the stream of characters xs6 does not contain white space, accessing the tail of words xs will loop.WThe W% function is an inverse operation to V). It joins words with separating spaces.XThe X 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.YThe Y% function is an inverse operation to XA. It joins lines, after appending a terminating newline to each.ZThe Z( converts an infinite list to a stream.Beware-: Passing a finite list, will cause an error.80123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ+0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ+0134952:8;<=>?@6A7BCDEFGHIJKLMNOPQRSTUVWXYZ70123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ1F(C) 2008-2011 Edward Kmett, (C) 2008 Iavor S. Diatchki BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy+3[\]^_`abcdefghi[\]^_`abcdefghi[^`a_bc\]defghi[\]^_`abcdefghiB(C) 2008-2011 Edward Kmett, (C) 2004 Dave Menendez BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy+3F nO(log n)O(1)qO(log n).rO(1) constO(1)uO(1).wO(log n).xO(1).yO(log n).zO(log n).=jklmnopqrstuvwxyz{|}~jklmnopqrstuvwxyz{|}~jlkrsqtuvwxyz{op}|~mn9jlkmnopqrstuvwxyz{|}~kr(C) 2011 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy+3       !"#$%& '()*+,-.#/0 '$123456789:;<=> !"?@AB*CDEFGHIJK(LMNOPQRS$T%&UV 'WX()*Y+,-.QRSV U'0XZ[\]$^_`abcdeRfghijklmnopqrstuvwxyz{|}~rvxwy{|}~tuCfghijklmnopq streams-3.2.1&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 elemIndexzipzipWithunzipStreamrepeatindexedfromtailssplitsplitWfromListinsertinsertByadjustupdate:>mapunfoldinitsscanlscanl'scanl1scanl1'iteratecyclefilter partitiongroupgroupBy elemIndices findIndiceswordsunwordslinesunlinesSupply leftSupply rightSupply newSupplynewDupableSupply newEnumSupply newNumSupplynewDupableEnumSupplynewDupableNumSupplysplits splitSkewsplit2split3split4Future:<Last replicatelengthconslastindextoFuture findIndex'ghc-prim GHC.Classes==$fSemigroupZipper $fMonadZipper$fApplicativeZipper$fComonadApplyZipper $fApplyZipper$fComonadZipper$fExtendZipper$fFunctorZipperCompleteBinTipbinweighttoList mapWithIndex indexComplete dropComplete splitCompletesplitCompleteWadjustComplete $fMonadStream$fSemigroupStream$fRepresentableStream$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