!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(C) 2011 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy 0:DMR O(1) consO(1).O(1). O(log n). O(log n). O(n). O(n) O(n)(O(n), O(log n))b split at _some_ edge where function goes from False to True. best used with a monotonic function(O(n), O(log n))b split at _some_ edge where function goes from False to True. best used with a monotonic function IsplitW p xs = (map extract &&& fmap (fmap extract)) . split p . duplicateO(n)O(n)5. Finds the split in O(log n), but then has to reconsO(log n)0 Change the value of the nth entry in the future6  !"#$%&'()*   3  !"#$%&'()*55(C) 2011-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportableSafe0:M0Extract the focused element1(Move the head of the zipper to the right2'Move the head of the zipper to the left3JCons before the head of the zipper. The head now points to the new element4TMove the head of the zipper one step to the right, returning the value we move over.5Interleave two Zippers xs and ys', alternating elements from each list. K[x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...] interleave = (<>)66 y xs1 creates an alternating stream of elements from xs and y.773 computes the transposition of a stream of streams.99 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.AThe A function takes a predicate and a stream and returns the index of the first element in the stream that satisfies the predicate,Beware: A p xs* will diverge if none of the elements of xs satisfy p.-Internal helper, used to find an index in theBThe BY function returns the index of the first element in the given stream which is equal (by ) to the query element,Beware: B x xs* will diverge if none of the elements of xs equal x.CThe CG function takes two streams and returns a list of corresponding pairs. zip = liftA2 (,)DThe D function generalizes Ct. Rather than tupling the functions, the elements are combined using the function passed as the first argument to D. zipWith = liftA2EThe E function is the inverse of the C function.$,-./0123456789:;<=>?@ABCDEFGHIJKLM,-./0123456789:;<=>?@ABCDE,-1265789:/@E.034;<=>?ABCD#,-./0123456789:;<=>?@ABCDEFGHIJKLM-0S(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) Trustworthy0:DMR%P6Extract the sequence following the head of the stream.QrThe unfold function is similar to the unfold for lists. Note there is no base case: all streams must be infinite.RInterleave two Streams xs and ys', alternating elements from each list. 9[x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...]SThe S function takes a stream xs) and returns all the finite prefixes of xs.Note that this S is lazier then Data.List.inits: inits _|_ = [] ::: _|_ while for Data.List.inits: inits _|_ = _|_TPrepend a list to a stream.U(Flatten a stream of lists into a stream.VV y xs1 creates an alternating stream of elements from xs and y.WW3 yields a stream of successive reduced values from: @scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]XW3 yields a stream of successive reduced values from: @scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]YY is a variant of W% that has no starting value argument: .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]Zscanl1' is a strict W 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), ..]]] xs$ returns the infinite repetition of xs: :cycle [1,2,3] = Cons 1 (Cons 2 (Cons 3 (Cons 1 (Cons 2 ...^^ n xs returns the first n elements of xs.BewareH: passing a negative integer as the first argument will cause an error.__ 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.`` 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.aa p xs+ returns the longest prefix of the stream xs for which the predicate p holds.bb p xs% returns the suffix remaining after a p xs.Beware0: this function may diverge if every element of xs satisfies p, e.g. dropWhile even (repeat 0) will loop.cc p xs returns the longest prefix of xs that satisfies p,, together with the remainder of the stream.dThe d p function is equivalent to c not . p.ee 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.fThe f 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.gThe g 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" ::: ...iThe isPrefix function returns True2 if the first argument is a prefix of the second.jxs !! 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.kThe kY function returns the index of the first element in the given stream which is equal (by ) to the query element,Beware: k x xs* will diverge if none of the elements of xs equal x.lThe l function extends k[, by returning the indices of all elements equal to the query element, in ascending order.Beware: l x xs will diverge if any suffix of xs does not contain x.mThe m function takes a predicate and a stream and returns the index of the first element in the stream that satisfies the predicate,Beware: m p xs* will diverge if none of the elements of xs satisfy p.nThe n function extends mZ, by returning the indices of all elements satisfying the predicate, in ascending order.Beware: n p xs4 will diverge if all the elements of any suffix of xs fails to satisfy p.oThe oG function takes two streams and returns a list of corresponding pairs.pThe p function generalizes ot. Rather than tupling the functions, the elements are combined using the function passed as the first argument to p.qThe q function is the inverse of the o function.rThe re 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.sThe s% function is an inverse operation to r). It joins words with separating spaces.tThe t 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.uThe u% function is an inverse operation to tA. It joins lines, after appending a terminating newline to each.5NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu(NOPSTUVRWXYZ[\]Q^_`abcdefghijklmnopqrstu4NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~O5F(C) 2008-2011 Edward Kmett, (C) 2008 Iavor S. Diatchki BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy0:B(C) 2008-2015 Edward Kmett, (C) 2004 Dave Menendez BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy 0:DMRO(log n)O(1)O(1) consO(1).O(log n).O(1).O(log n).O(log n).7355(C) 2011-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable Trustworthy0:DR5      !"#$%&'()*+,-./0123456789: ;<=>?@ABCDEFGHIJKLM NO PQR;STUV<WX=>?YZ[\@B]A^CDE_`ab!#"$&'()* +,cdefghijklmnopqrstuvwxyz{|}~ -./01234 d"streams-3.3-EJSwpt59nIF1UqJe7H3dScData.Stream.Future.SkewData.Stream.Infinite.Skew&Data.Stream.Infinite.Functional.ZipperData.Stream.InfiniteData.Stream.SupplyData.Stream.Futurebase Data.FoldablelengthStream interleaverepeatindexedfrom<|tailuncons!!drop dropWhilespanbreaksplitsplitWinsertinsertByadjustupdate $fMonadStream$fSemigroupStream$fRepresentableStream$fDistributiveStream$fTraversable1Stream$fTraversableStream$fFoldable1Stream$fFoldableStream $fAltStream$fApplicativeStream$fComonadApplyStream $fApplyStream$fComonadStream$fExtendStream$fFunctorStream $fShowStream$fTraversable1Complete$fTraversableComplete$fFoldable1Complete$fFoldableComplete$fComonadComplete$fExtendComplete$fFunctorComplete$fShowCompleteZipper:~ toSequencereverseheaduntail intersperse transposetakesplitAt takeWhile isPrefixOf findIndex elemIndexzipzipWithunzip$fSemigroupZipper $fMonadZipper$fApplicativeZipper$fComonadApplyZipper $fApplyZipper$fComonadZipper$fExtendZipper$fFunctorZipper:>unfoldinitsprependconcatscanlscanl'scanl1scanl1'iteratecyclefilter partitiongroupgroupBy elemIndices findIndiceswordsunwordslinesunlines $fDataStreamSupply leftSupply rightSupply newSupplynewDupableSupply newEnumSupply newNumSupplynewDupableEnumSupplynewDupableNumSupplysplits splitSkewsplit2split3split4$fTraversable1Supply$fTraversableSupply$fFoldable1Supply$fFoldableSupply$fApplicativeSupply $fApplySupply$fComonadSupply$fExtendSupply$fFunctorSupply $fShowSupply $fReadSupply $fEqSupply $fOrdSupply $fDataSupplyFutureLast:< replicate singletonlastindextoFuture$fIsListFuture$fTraversable1Future$fTraversableFuture$fFoldable1Future$fFoldableFuture $fAltFuture$fApplicativeFuture$fComonadApplyFuture $fApplyFuture$fComonadFuture$fExtendFuture$fFunctorFuture $fShowFuture$fSemigroupFuture $fEqFuture $fOrdFuture $fReadFuture $fDataFutureCompleteTipBinbinweight mapWithIndex indexComplete dropComplete splitCompletesplitCompleteWadjustComplete findIndex'ghc-prim GHC.Classes== extendTree