h&782u      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(C) 2011-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett  provisionalportable Trustworthy65(C) 2008-2015 Edward Kmett, (C) 2004 Dave Menendez BSD-style (see the file LICENSE)Edward Kmett  provisionalportable Trustworthy6]streamsO(log n)streamsO(1)streamsO(1) cons streamsO(1).!streamsO(log n)."streamsO(1).#streamsO(log n).$streamsO(log n). !"#$%&'()*+,-. !"#$%'&()+,.-*55(C) 2011 Edward Kmett, (C) 2007-2010 Wouter Swierstra, Bas van Dijk BSD-style (see the file LICENSE)Edward Kmett  provisionalportable (Haskell 2010) Trustworthy6 (Fstreams(Extract the first element of the stream.Gstreams6Extract the sequence following the head of the stream.HstreamsThe unfold function is similar to the unfold for lists. Note there is no base case: all streams must be infinite.IstreamsInterleave two Streams xs and ys', alternating elements from each list. 9[x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...]JstreamsThe J function takes a stream xs) and returns all the finite prefixes of xs.Note that this J is lazier then Data.List.inits: inits _|_ = [] ::: _|_ while for Data.List.inits: inits _|_ = _|_KstreamsPrepend a list to a stream.Lstreams(Flatten a stream of lists into a stream.MstreamsM y xs1 creates an alternating stream of elements from xs and y.NstreamsN3 yields a stream of successive reduced values from: scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]OstreamsN3 yields a stream of successive reduced values from: scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]PstreamsP is a variant of N% that has no starting value argument: .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]Qstreamsscanl1' is a strict N that has no starting value.RstreamsR3 computes the transposition of a stream of streams.SstreamsS f x= produces the infinite sequence of repeated applications of f to x. #iterate f x = [x, f x, f (f x), ..]TstreamsT xs$ returns the infinite repetition of xs: :cycle [1,2,3] = Cons 1 (Cons 2 (Cons 3 (Cons 1 (Cons 2 ...UstreamsU n xs returns the first n elements of xs.Beware: passing a negative integer as the first argument will cause an error.VstreamsV n xs drops the first n) elements off the front of the sequence xs.Beware: passing a negative integer as the first argument will cause an error.WstreamsW n xs- returns a pair consisting of the prefix of xs of length n= and the remaining stream immediately following this prefix.Beware: passing a negative integer as the first argument will cause an error.XstreamsX p xs+ returns the longest prefix of the stream xs for which the predicate p holds.YstreamsY p xs% returns the suffix remaining after X p xs.Beware0: this function may diverge if every element of xs satisfies p, e.g. dropWhile even (repeat 0) will loop.ZstreamsZ p xs returns the longest prefix of xs that satisfies p,, together with the remainder of the stream.[streamsThe [ p function is equivalent to Z not . p.\streams\ 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.]streamsThe ] 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.Beware: 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.^streamsThe ^ 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, group $ cycle "Mississippi" = "M" ::: "i" ::: "ss" ::: "i" ::: "ss" ::: "i" ::: "pp" ::: "i" ::: "M" ::: "i" ::: ...`streamsThe isPrefix function returns True2 if the first argument is a prefix of the second.astreamsxs !! n# returns the element of the stream xs at index n/. Note that the head of the stream has index 0.Beware: passing a negative integer as the first argument will cause an error.bstreamsThe b 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.cstreamsThe c function extends b, by returning the indices of all elements equal to the query element, in ascending order.Beware: c x xs will diverge if any suffix of xs does not contain x.dstreamsThe d function takes a predicate and a stream and returns the index of the first element in the stream that satisfies the predicate,Beware: d p xs* will diverge if none of the elements of xs satisfy p.estreamsThe e function extends d, by returning the indices of all elements satisfying the predicate, in ascending order.Beware: e p xs4 will diverge if all the elements of any suffix of xs fails to satisfy p.fstreamsThe f function takes two streams and returns a list of corresponding pairs.gstreamsThe g function generalizes f. Rather than tupling the functions, the elements are combined using the function passed as the first argument to g.hstreamsThe h function is the inverse of the f function.istreamsThe i 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.jstreamsThe j% function is an inverse operation to i). It joins words with separating spaces.kstreamsThe k 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.lstreamsThe l% function is an inverse operation to k. It joins lines, after appending a terminating newline to each.wstreamsxstreams)DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl)DEFGJKLMINOPQRSTHUVWXYZ[\]^_`abcdefghijklE5(C) 2011-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett  provisionalportable Safe-Inferred6-$streamsExtract the focused elementstreams(Move the head of the zipper to the rightstreams'Move the head of the zipper to the leftstreamsCons before the head of the zipper. The head now points to the new elementstreamsMove the head of the zipper one step to the right, returning the value we move over.streamsInterleave two Zippers xs and ys', alternating elements from each list. [x1,x2,...] `interleave` [y1,y2,...] == [x1,y1,x2,y2,...] interleave = (<>)streams y xs1 creates an alternating stream of elements from xs and y.streams3 computes the transposition of a stream of streams.streams n xs drops the first n) elements off the front of the sequence xs.streams n xs- returns a pair consisting of the prefix of xs of length n= and the remaining stream immediately following this prefix.Beware: passing a negative integer as the first argument will cause an error if you access the taken portionstreams p xs+ returns the longest prefix of the stream xs for which the predicate p holds.streams 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.streams p xs returns the longest prefix of xs that satisfies p,, together with the remainder of the stream.streamsThe  p function is equivalent to  not . p.streamsThe isPrefix function returns True2 if the first argument is a prefix of the second.streamsxs !! n# returns the element of the stream xs at index n/. Note that the head of the stream has index 0.streamsThe  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.streams-Internal helper, used to find an index in thestreamsThe  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.streamsThe  function takes two streams and returns a list of corresponding pairs. zip = liftA2 (,)streamsThe  function generalizes . Rather than tupling the functions, the elements are combined using the function passed as the first argument to . zipWith = liftA2streamsThe  function is the inverse of the  function.~~0(C) 2011 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett  provisionalportable Trustworthy61streamsO(1) consstreamsO(1).streamsO(1).streamsO(log n).streamsO(log n).streamsO(n).streamsO(n)streamsO(n)streams(O(n), O(log n)) split at _some_ edge where function goes from False to True. best used with a monotonic functionstreams(O(n), O(log n)) split at _some_ edge where function goes from False to True. best used with a monotonic function splitW p xs = (map extract &&& fmap (fmap extract)) . split p . duplicatestreamsO(n)streamsO(n)5. Finds the split in O(log n), but then has to reconsstreamsO(log n)0 Change the value of the nth entry in the futurestreamsstreams55(C) 2008-2011 Edward Kmett, (C) 2008 Iavor S. Diatchki BSD-style (see the file LICENSE)Edward Kmett  provisionalportable Trustworthy625         !"#$% &'()*+,-./0123456789:;<= >?@ABCDEFGHIJK(LM)*+NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs= t%'?CHK(LM)*+RSVTXYZuvwxyz{|;?}"#% 'S()*+,-/0123456789_~ijkl`bacdefghmn:, $streams-3.3.2-GHxbWOFgwuiBkk6WDivDtSData.Stream.FutureData.Stream.Future.SkewData.Stream.Infinite&Data.Stream.Infinite.Functional.ZipperData.Stream.Infinite.SkewData.Stream.Supplybase Data.FoldablelengthFutureLast:<tailindex$fIsListFuture$fApplicativeFuture$fSemigroupFuture $fAltFuture$fComonadApplyFuture $fApplyFuture$fComonadFuture$fExtendFuture$fTraversable1Future$fFoldable1Future$fTraversableFuture$fFoldableFuture$fFunctorFuture $fEqFuture $fOrdFuture $fShowFuture $fReadFuture $fDataFuture replicateindexedfrom singleton<|lastunconsdrop dropWhilespanbreaksplitsplitWtoFutureinsertinsertByadjustupdate$fTraversable1Complete$fTraversableComplete$fFoldable1Complete$fFoldableComplete$fComonadComplete$fExtendComplete$fFunctorComplete$fShowCompleteStream:>headunfold interleaveinitsprependconcat interspersescanlscanl'scanl1scanl1' transposeiteratecycletakesplitAt takeWhilefilter partitiongroupgroupBy isPrefixOf!! elemIndex elemIndices findIndex findIndiceszipzipWithunzipwordsunwordslinesunlines $fMonadStream$fTraversable1Stream$fFoldable1Stream$fTraversableStream$fFoldableStream$fApplicativeStream$fComonadApplyStream $fApplyStream$fComonadStream$fExtendStream$fAbsurdStream$fBoringStream$fRepresentableStream$fDistributiveStream$fFunctorStream $fShowStream $fDataStreamZipper:~ toSequencereverseuntail$fSemigroupZipper $fMonadZipper$fApplicativeZipper$fComonadApplyZipper $fApplyZipper$fComonadZipper$fExtendZipper$fFunctorZipperrepeat$fSemigroupStream $fAltStreamSupply leftSupply rightSupply newSupplynewDupableSupply newEnumSupply newNumSupplynewDupableEnumSupplynewDupableNumSupplysplits splitSkewsplit2split3split4$fTraversable1Supply$fTraversableSupply$fFoldable1Supply$fFoldableSupply$fApplicativeSupply $fApplySupply$fComonadSupply$fExtendSupply$fFunctorSupply $fShowSupply $fReadSupply $fEqSupply $fOrdSupply $fDataSupplyghc-prim GHC.Classes== findIndex'