1w      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvportable provisional$John Goerzen <jgoerzen@complete.org> DThis is the primary class for structures that are to be considered 2foldable. A minimum complete definition provides  and .  Instances of , can be folded, and can be many and varied. $These functions are used heavily in  Data.ListLike. Left-associative fold Strict version of .  A variant of ) with no base case. Requires at least 1  list element. Right-associative fold Strict version of  Like , but with no starting value 4Combine the elements of a structure using a monoid.   =  id 8Map each element to a monoid, then combine the results   portable provisional$John Goerzen <jgoerzen@complete.org>Q An extension to  ' for those data types that are capable &of dealing with infinite lists. Some   functions are capable Fof working with finite or infinite lists. The functions here require 3infinite list capability in order to work at all. <An infinite list of repeated calls of the function to args 1An infinite list where each element is the same ,Converts a finite list into a circular one ,The class implementing list-like functions. &It is worth noting that types such as  Data.Map.Map can be instances of  @. Due to their specific ways of operating, they may not behave 2in the expected way in some cases. For instance,  may not increase Kthe size of a map if the key you have given is already in the map; it will &just replace the value already there. %Implementators must define at least:  singleton  head  tail  null or genericLength The empty list 1Creates a single-element list out of an element @Like (:) for lists: adds an element to the beginning of a list "Adds an element to the *end* of a  . !Combines two lists. Like (++).  Extracts the first element of a  . Extracts the last element of a  . $Gives all elements after the head. 8All elements of the list except the last one. See also -. "Tests whether the list is empty. Length of the list. See also R. 6Apply a function to each element, returning any other  valid  .  will always be at least G as fast, if not faster, than this function and is recommended 6 if it will work for your purposes. See also =. Like 6, but without the possibility of changing the type of H the item. This can have performance benefits for things such as D ByteStrings, since it will let the ByteString use its native & low-level map implementation. !Reverse the elements in a list. 3Add an item between each element in the structure Flatten the structure. ;Map a function over the items and concatenate the results.  See also . Like *, but without the possibility of changing C the type of the item. This can have performance benefits . for some things such as ByteString. (True if any items satisfy the function !(True if all items satisfy the function "The maximum value of the list #The minimum value of the list $BGenerate a structure with the specified length with every element ) set to the item passed in. See also V %2Takes the first n elements of the list. See also S. &2Drops the first n elements of the list. See also T 'Equivalent to (% n xs, & n xs) . See also U. (BReturns all elements at start of list that satisfy the function. )?Drops all elements form the start of the list that satisfy the  function. *The equivalent of (( f xs, ) f xs) +The equivalent of * (w . f) ,ASplit a list into sublists, each which contains equal arguments. M For order-preserving types, concatenating these sublists will produce # the original list. See also O. -2All initial segments of the list, shortest first .#All final segnemts, longest first /=True when the first list is at the beginning of the second. 0=True when the first list is at the beginning of the second. 1ATrue when the first list is wholly containted within the second 2%True if the item occurs in the list 3-True if the item does not occur in the list 4BTake a function and return the first matching element, or Nothing % if there is no such element. 56Returns only the elements that satisfy the function. 6;Returns the lists that do and do not satisfy the function.  Same as (5 p xs, 5 (w . p) xs) 7AThe element at 0-based index i. Raises an exception if i is out + of bounds. Like (!!) for lists. 81Returns the index of the element, if it exists. 99Returns the indices of the matching elements. See also  ; :DTake a function and return the index of the first matching element, + or Nothing if no element matches ;=Returns the indices of all elements satisfying the function <>Evaluate each action in the sequence and collect the results =A map in monad space. Same as < .   See also > >Like =3, but without the possibility of changing the type L of the item. This can have performance benefits with some types. ?3A map in monad space, discarding results. Same as  Y .  @4Removes duplicate elements from the list. See also J A9Removes the first instance of the element from the list.  See also K BAList difference. Removes from the first list the first instance 0 of each element of the second list. See '(\)' and L C;List union: the set of elements that occur in either list. E Duplicate elements in the first list will remain duplicate.  See also M. DAList intersection: the set of elements that occur in both lists.  See also N E>Sorts the list. On data types that do not preserve ordering, C or enforce their own ordering, the result may not be what  you expect. See also P. FEInserts the element at the last place where it is still less than or I equal to the next element. On data types that do not preserve E ordering, or enforce their own ordering, the result may not H be what you expect. On types such as maps, this may result in . changing an existing item. See also Q. G@Converts the structure to a list. This is logically equivolent  to I1, but may have a more optimized implementation. H&Generates the structure from a list. I,Converts one ListLike to another. See also G. # Default implementation is fromListLike = map id JGeneric version of @ KGeneric version of K LGeneric version of B MGeneric version of C NGeneric version of D OGeneric version of ,. P3Sort function taking a custom comparison function QLike F), but with a custom comparison function RLength of the list SGeneric version of % TGeneric version of & UGeneric version of ' VGeneric version of $ W<Takes two lists and returns a list of corresponding pairs. XDTakes two lists and combines them with a custom combining function Y,Evaluate each action, ignoring the results Q  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYQ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV WXYQ  I !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYportable provisional$John Goerzen <jgoerzen@complete.org> ZAn extension to  ' for those data types that are similar to a x". Minimal complete definition is [ and \. [Converts the structure to a x \ Converts a x to a list ](Breaks a string into a list of strings ^&Breaks a string into a list of words _ Joins lines ` Joins words yz{|Z[\]^_`Z[\]^_`Z[\]^_`[\]^_`portable provisional$John Goerzen <jgoerzen@complete.org>a&Returns True if all elements are True b$Returns True if any element is True cThe sum of the list dThe product of the list e>Converts a list of pairs into two separate lists of elements f!Converts to a MonadPlus instance g-List-like destructor (like Data.Maybe.maybe) WXYabcdefg abcdWXeYfgabcdefgportable provisional$John Goerzen <jgoerzen@complete.org>hAn extension to  # for those data types that support I/$O. These functions mirror those in  System.IO for the most part. They /also share the same names; see the comments in  Data.ListLike for help importing them. DNote that some types may not be capable of lazy reading or writing. "Therefore, the usual semantics of  System.IO functions regarding laziness >may or may not be available from a particular implementation. Minimal complete definition:  hGetLine  hGetContents  hGet  hGetNonBlocking  hPutStr i(Reads a line from the specified handle j6Read entire handle contents. May be done lazily like  System.IO.hGetContents. k%Read specified number of bytes. See System.IO.hGet for  particular semantics. lNon-blocking read. See System.IO.hGetNonBlocking for more. mWriting entire data. n#Write data plus newline character. oRead one line p%Read entire content from stdin. See j. qWrite data to stdout. r-Write data plus newline character to stdout. s@Interact with stdin and stdout by using a function to transform % input to output. May be lazy. See System.IO.interact for more. tRead file. May be lazy. uWrite data to file. vAppend data to file. hijklmnopqrstuvhijklmnopqrstuvhijklmnopqrstuvijklmnopqrstuvportable provisional$John Goerzen <jgoerzen@complete.org>}~portable provisional$John Goerzen <jgoerzen@complete.org>s  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^abcdehijklmnopqrstuvsabcdWXeYhijklmnopqrstuv  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVZ[\]^       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ListLike-2.0.0Data.ListLike.FoldableLLData.ListLike.BaseData.ListLike.StringData.ListLike.UtilsData.ListLike.IOData.ListLike.Instances Data.ListLike FoldableLLfoldlfoldl'foldl1foldrfoldr'foldr1foldfoldMapInfiniteListLikeiteraterepeatcycleListLikeempty singletonconssnocappendheadlasttailinitnulllengthmaprigidMapreverse intersperseconcat concatMaprigidConcatMapanyallmaximumminimum replicatetakedropsplitAt takeWhile dropWhilespanbreakgroupinitstails isPrefixOf isSuffixOf isInfixOfelemnotElemfindfilter partitionindex elemIndex elemIndices findIndex findIndicessequencemapM rigidMapMmapM_nubdelete deleteFirstsunion intersectsortinserttoListfromList fromListLikenubBydeleteBydeleteFirstsByunionBy intersectBygroupBysortByinsertBy genericLength genericTake genericDropgenericSplitAtgenericReplicatezipzipWith sequence_ StringLiketoString fromStringlineswordsunlinesunwordsandorsumproductunzip toMonadPluslist ListLikeIOhGetLine hGetContentshGethGetNonBlockinghPutStr hPutStrLngetLine getContentsputStrputStrLninteractreadFile writeFile appendFilebase GHC.ClassesnotGHC.BaseStringmyLinesmyWords myUnlines myUnwordsmi64toi strict2lazyl2m