úÎzPqÍg      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefportable provisionalEdward Kmett <ekmett@gmail.com> Safe-InferredRA refinement of Integral to represent types that do not contain negative numbers. ghijklmnopqrsghijklmnopqrsportable provisionalEdward Kmett <ekmett@gmail.com> Safe-Inferredportable provisionalEdward Kmett <ekmett@gmail.com> Safe-Inferred0< produces a new stream by repeatedly applying the unfolding : function to the seed value to produce an element of type b and a new 2 seed value. When the unfolding function returns t instead of $ a new seed value, the stream ends.  ( efficiently turns a normal list into a  stream,  producing t if the input is empty. !!? produces the first element of the stream, and a stream of the  remaining elements, if any. ")Extract the first element of the stream. #/Extract the possibly-empty tail of the stream. $(Extract the last element of the stream. %:Extract everything except the last element of the stream. &"Prepend an element to the stream. ' Synonym for &. (Sort a stream. )Converts a normal list to a  stream. (Raises an error if given an empty list. */Convert a stream to a normal list efficiently. u"Lift list operations to work on a  stream. Beware2: If the provided function returns an empty list,  this will raise an error. +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. .. x xs inserts x into the last position in xs where it H is still less than or equal to the next element. In particular, if the < list is sorted beforehand, the result will also be sorted. // is similar to v%, 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. 3'intersperse x xs'0 alternates elements of the list with copies of x. . intersperse 0 (1 :| [2,3]) == 1 :| [0,2,0,3] 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 stream. 77 x3 returns a constant stream, where all elements are  equal to x. 88 n xs returns the first n elements of xs. 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. . 'splitAt' n xs == ('take' n xs, 'drop' n xs) 0 xs == ys ++ zs where (ys, zs) = 'splitAt' n xs ;; 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. 5 'span' p xs == ('takeWhile' p xs, 'dropWhile' p xs) - xs == ys ++ zs where (ys, zs) = 'span' p xs >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  xsA, and returns a pair of lists. The first list corresponds to the  elements of xs for which p& holds; the second corresponds to the  elements of xs for which p does not hold. ; 'partition' p xs = ('filter' p xs, 'filter' (not . p) xs) AThe A/ function takes a stream and returns a list of A streams such that flattening the resulting list is equal to the 8 argument. Moreover, each stream in the resulting list ? contains only equal elements. For example, in list notation: f 'group' $ 'cycle' "Mississippi" = "M" : "i" : "ss" : "i" : "ss" : "i" : "pp" : "i" : "M" : "i" : ... BB operates like A!, but uses the provided equality  predicate instead of w. CC operates like A", but uses the knowledge that its < input is non-empty to produce guaranteed non-empty output. DD is to C as B is to A. 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. Beware9: a negative or out-of-bounds index will cause an error. GThe G4 function takes two streams and returns a stream of  corresponding pairs. HThe H function generalizes G. Rather than tupling < the elements, the elements are combined using the function  passed as the first argument. 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. Beware3: if the input contains no words (i.e. is entirely ( whitespace), this will cause an error. KThe K% function is an inverse operation to J. It % joins words with separating spaces. Beware : the input ("" :| []) will cause an error. LThe L6 function breaks a stream of characters into a stream @ 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. 8 !"#$%&'()*u+,-./0123456789:;<=>?@ABCDEFGHIJKLMxyz{|2 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM2+3/012"#$%&'!(6,-475.89:;<=>?@ABCDEFGHIJKLM)* 7 !"#$%&'()*u+,-./0123456789:;<=>?@ABCDEFGHIJKLMxyz{|portable provisionalEdward Kmett <ekmett@gmail.com> Safe-Inferred NOption is effectively } 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 } 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 pqr stuvwxyz{| p}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§semigroups-0.8.4.1Data.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.MaybeNothinglift Data.Foldablefoldlghc-prim GHC.Classes==$fFoldableNonEmpty$fTraversableNonEmpty$fMonadNonEmpty$fApplicativeNonEmpty$fFunctorNonEmptyMaybe$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()