e^]g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefportable provisionalEdward Kmett <ekmett@gmail.com> Safe-InferedRA refinement of Integral to represent types that do not contain negative numbers. ghijklmnopqrsghijklmnopqrsportable provisionalEdward Kmett <ekmett@gmail.com> Safe-Inferedportable provisionalEdward Kmett <ekmett@gmail.com> Safe-Infered'"(Extract the first element of the stream #.Extract the possibly empty tail of the stream $'Extract the last element of the stream %9Extract everything except the last element of the stream &cons onto a stream (Sort a stream )(Converts an non-empty list to a stream. *'Convert a stream to a list efficiently +map a function over a  stream ,The , function takes a stream xs and returns all the  finite prefixes of xs. -The - function takes a stream xs and returns all the  suffixes of xs. .. an item into a  // is similar to t%, but returns a stream of successive  reduced values from the left:  D scanl f z [x1, x2, ...] == z :| [z `f` x1, (z `f` x1) `f` x2, ...]  Note that & last (scanl f z xs) == foldl f z xs. 00 is the right-to-left dual of /.  Note that & head (scanr f z xs) == foldr f z xs. 11 is a variant of /& that has no starting value argument: F scanl1 f [x1, x2, ...] == x1 :| [x1 `f` x2, x1 `f` (x2 `f` x3), ...] 22 is a variant of 0& that has no starting value argument. 44 f x produces the infinite sequence  of repeated applications of f to x. % iterate f x = [x, f x, f (f x), ..] 55 xs$ returns the infinite repetition of xs: & cycle [1,2,3] = 1 :| [2,3,1,2,3,...] 66 a finite NonEmpty 77 x3 returns a constant stream, where all elements are  equal to x. 88 n xs returns the first n elements of xs. Beware8: passing a negative integer as the first argument will  cause an error. 99 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. :: n xs, returns a pair consisting of the prefix of xs  of length n= and the remaining stream immediately following this prefix. Beware8: passing a negative integer as the first argument will  cause an error. ;; 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. == 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. ?? p xs, removes any elements from xs that do not satisfy p. @The @ 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. AThe A1 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, b group $ cycle "Mississippi" = "M" : "i" : "ss" : "i" : "ss" : "i" : "pp" : "i" : "M" : "i" : ... EThe isPrefix function returns True if the first argument is  a prefix of the second. Fxs !! 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. GThe G2 function takes two streams and returns a list of  corresponding pairs. HThe H function generalizes G. Rather than tupling = the functions, the elements are combined using the function ! passed as the first argument to H. IThe I function is the inverse of the G function. JThe J/ function breaks a stream of characters into a 7 stream of words, which were delimited by white space. KThe K% function is an inverse operation to J. It % joins words with separating spaces. LThe L4 function breaks a stream of characters into a list @ of strings at newline characters. The resulting strings do not  contain newlines. MThe M% function is an inverse operation to L. It = joins lines, after appending a terminating newline to each. 7 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMuvwxy2 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM2+3/012"#$%&'!(6,-475.89:;<=>?@ABCDEFGHIJKLM)* 6 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMuvwxyportable provisionalEdward Kmett <ekmett@gmail.com> Safe-Infered NOption is effectively z with a better instance of , built off of an underlying `  instead of an underlying F. Ideally, this type would not exist at all and we would just fix the  intance of z Q-Provide a Semigroup for an arbitrary Monoid. TUse N (T a) -- to get the behavior of  WUse N (W a) -- to get the behavior of  aAn associative operation.  (a <> b) <> c = a <> (b <> c) bReduce a non-empty list with <> XThe default definition should be sufficient, but this can be overridden for efficiency. cRepeat a value (n + 1) times.  7 times1p n a = a <> a <> ... <> a -- using <> n times UThe default definition uses peasant multiplication, exploiting associativity to only  require O(log n) uses of <>. dA generalization of   to an arbitrary `. ; May fail to terminate for some values in some semigroups. f@This lets you use a difference list of a Semigroup as a Monoid. BNOPQRSTUVWXYZ[\]^_`abcdef{|}~/ NOPQRSTUVWXYZ[\]^_`abcdef/`abc]^_Z[\WXYTUVQRS   NOPefd3NOPQRSTUVWXYZ[\]^_`abcdef{|}~                       !"#$%&'()*+,-./012345678 9:;<=>?@ABCDEFGHIJKLMNOPQQRSTUVWXXYZZ[\]^_`abcdefghijklmno pqrstuv wxyz{|}~semigroups-0.8.2Data.SemigroupNumeric.Natural.InternalData.List.NonEmptyNumeric.Natural Data.MonoidLastFirst Data.ListcyclebasemconcatmappendmemptyMonoidgetDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductWhole toNatural unsafePredNatural runNaturalNonEmpty:|xorunfoldnonEmptyunconsheadtaillastinit<|conssortfromListtoListmapinitstailsinsertscanlscanrscanl1scanr1 intersperseiteratereverserepeattakedropsplitAt takeWhile dropWhilespanbreakfilter partitiongroupgroupBygroup1groupBy1 isPrefixOf!!zipzipWithunzipwordsunwordslinesunlinesOption getOption WrappedMonoid WrapMonoid unwrapMonoidgetLastgetFirstMaxgetMaxMingetMin Semigroup<>sconcattimes1pcycle1optiondiff$fWholeNatural $fWholeWord64 $fWholeWord32 $fWholeWord16 $fWholeWord8 $fWholeWord$fIntegralNatural $fEnumNatural $fRealNatural $fBitsNatural $fNumNatural $fReadNatural $fShowNatural Data.Foldablefoldl$fFoldableNonEmpty$fTraversableNonEmpty$fMonadNonEmpty$fApplicativeNonEmpty$fFunctorNonEmpty Data.MaybeMaybe$fSemigroupMap$fSemigroupIntMap$fSemigroupSet$fSemigroupIntSet$fSemigroupSeq$fMonoidOption$fSemigroupOption$fTraversableOption$fFoldableOption$fMonadFixOption$fMonadPlusOption$fAlternativeOption $fMonadOption$fApplicativeOption$fFunctorOption$fMonoidWrappedMonoid$fSemigroupWrappedMonoid$fSemigroupLast$fSemigroupFirst $fMonoidMax$fSemigroupMax $fMonoidMin$fSemigroupMin$fSemigroupNonEmpty$fSemigroupLast0$fSemigroupFirst0$fSemigroupProduct$fSemigroupSum$fSemigroupAny$fSemigroupAll$fSemigroupEndo$fSemigroupDual$fSemigroup(,,,,)$fSemigroup(,,,)$fSemigroup(,,)$fSemigroup(,)$fSemigroupEither$fSemigroupMaybe $fSemigroup[]$fSemigroup(->) $fSemigroup()