PD=      !"#$%&'()*+,-./0123456789:;< experimentaldons@galois.com-Representation-improving polymorphic tuples. 'Extract the first component of a pair. (Extract the second component of a pair. 7 converts an uncurried function to a curried function. Construct a new pair. 5 converts a curried function to a function on pairs. 8Convert an adaptive pair to a regular polymorphic tuple 8Convert a regular polymorphic tuple to an adaptive pair =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   experimentaldons@galois.com0 ,Representation-improving polymorphic lists. The empty list Prepend a value onto a list Is the list empty? The first element of the list The tail of the list O(n)-, convert an adaptive list to a regular list O(n)-, convert an adaptive list to a regular list O(n)*, construct a list by enumerating a range O(1)4, uncons, take apart a list into the head and tail. O(n), Append two lists, i.e.,  > [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn] 6 [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...] ?If the first list is not finite, the result is the first list. 6 The spine of the first list argument must be copied. O(n);, Extract the last element of a list, which must be finite  and non-empty. O(n)9. Return all the elements of a list except the last one. ( The list must be finite and non-empty. O(n). + returns the length of a finite list as an . ' It is an instance of the more general Data.List.genericLength, 5 the result type of which may be any kind of number. O(n).  f xs" is the list obtained by applying f to each element  of xs, i.e.,  4 map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] * map f [x1, x2, ...] == [f x1, f x2, ...]  Properties: % map f . map g = map (f . g) & map f (repeat x) = repeat (f x) + map f (replicate n x) = replicate n (f x) O(n).  xs returns the elements of xs in reverse order.  xs/ must be finite. Will fuse as a consumer only. O(n). The * function takes an element and a list and  ` intersperses'0 that element between the elements of the list.  For example, ( intersperse ',' "abcde" == "a,b,c,d,e" O(n).  xs xss is equivalent to (  ( xs xss)).  It inserts the list xs in between the lists in xss and concatenates the  result. $ intercalate = concat . intersperse O(n). <, applied to a binary operator, a starting value (typically B the left-identity of the operator), and a list, reduces the list 0 using the binary operator, from left to right:  G foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn 9The list must be finite. The accumulator is whnf strict. O(n).  is a variant of & that has no starting value argument, . and thus must be applied to non-empty lists. O(n). <, applied to a binary operator, a starting value (typically C the right-identity of the operator), and a list, reduces the list 0 using the binary operator, from right to left: B foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...) O(n).  is a variant of & that has no starting value argument, . and thus must be applied to non-empty lists. O(n). Concatenate a list of lists.  concat :: [[a]] -> [a] !O(n), fusion:. Map a function over a list and concatenate the results. "O(n). "B returns the conjunction of a Boolean list. For the result to be  , the list must be finite; , however, results from a  7 value at a finite index of a finite or infinite list. #O(n). #B returns the disjunction of a Boolean list. For the result to be  , the list must be finite; , however, results from a  7 value at a finite index of a finite or infinite list. $O(n)%. Applied to a predicate and a list, $ determines if any element & of the list satisfies the predicate. %#Applied to a predicate and a list, % determines if all elements $ of the list satisfy the predicate. &O(n), fusion. The &8 function computes the sum of a finite list of numbers. 'O(n),fusion. The '< function computes the product of a finite list of numbers. (O(n). (( returns the maximum value from a list, : which must be non-empty, finite, and of an ordered type.  It is a special case of Data.List.maximumBy, which allows the 5 programmer to supply their own comparison function. )O(n). )( returns the minimum value from a list, : which must be non-empty, finite, and of an ordered type.  It is a special case of Data.List.minimumBy, which allows the 5 programmer to supply their own comparison function. *O(n). * is similar to #, but returns a list of successive  reduced values from the left:  B scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]  Properties: $ last (scanl f z xs) == foldl f z x +O(n). + is a variant of *& that has no starting value argument: 0 scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...] ,O(n). , is the right-to-left dual of *.  Properties: % head (scanr f z xs) == foldr f z xs -- is a variant of ,& that has no starting value argument. .O(n), . f x3 returns an infinite list of repeated applications  of f to x: ' iterate f x == [x, f x, f (f x), ...] /O(n). / x is an infinite list, with x the value of every element. 0O(n). 0 n x is a list of length n with x the value of  every element. ' It is an instance of the more general Data.List.genericReplicate,  in which n may be of any integral type. 1fusion. 1: ties a finite list into a circular one, or equivalently, C the infinite repetition of the original list. It is the identity  on infinite lists. 2The 2 function is a `dual' to : while  $ reduces a list to a summary value, 2 builds a list from ; a seed value. The function takes the element and returns Nothing - if it is done producing the list or returns Just (a,b) , in which  case, a is a prepended to the list and b is used as the next , element in a recursive call. For example,  , iterate f == unfoldr (\x -> Just (x, f x)) In some cases, 2 can undo a  operation:  ! unfoldr f' (foldr f z xs) == xs if the following holds:   f' (f x y) = Just (x,y)  f' z = Nothing A simple use of unfoldr:  > unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10  [10,9,8,7,6,5,4,3,2,1] TODO: AdaptPair state. 3O(n). 3 n, applied to a list xs, returns the prefix of xs  of length n, or xs itself if n >  xs:  " take 5 "Hello World!" == "Hello"  take 3 [1,2,3,4,5] == [1,2,3]  take 3 [1,2] == [1,2]  take 3 [] == []  take (-1) [1,2] == []  take 0 [1,2] == [] &It is an instance of the more general Data.List.genericTake,  in which n may be of any integral type. 4O(n). 4 n xs returns the suffix of xs  after the first n elements, or [] if n >  xs:  # drop 6 "Hello World!" == "World!"  drop 3 [1,2,3,4,5] == [4,5]  drop 3 [1,2] == []  drop 3 [] == []  drop (-1) [1,2] == [1,2]  drop 0 [1,2] == [1,2] &It is an instance of the more general Data.List.genericDrop,  in which n may be of any integral type. 55 n xs( returns a tuple where first element is xs prefix of  length n2 and second element is the remainder of the list:  1 splitAt 6 "Hello World!" == ("Hello ","World!") * splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5]) " splitAt 1 [1,2,3] == ([1],[2,3]) # splitAt 3 [1,2,3] == ([1,2,3],[]) # splitAt 4 [1,2,3] == ([1,2,3],[]) # splitAt 0 [1,2,3] == ([],[1,2,3]) & splitAt (-1) [1,2,3] == ([],[1,2,3]) It is equivalent to (3 n xs, 4 n xs).  5$ is an instance of the more general Data.List.genericSplitAt,  in which n may be of any integral type. 6O(n). 63 is the list membership predicate, usually written  in infix form, e.g., x 6 xs. 7O(n). 7 is the negation of 6. 8O(n). 89, applied to a predicate and a list, returns the list of 2 those elements that satisfy the predicate; i.e.,  # filter p xs = [ x | x <- xs, p x]  Properties: 5 filter p (filter q s) = filter (\x -> q x && p x) s 9O(n),fusion. 9' takes two lists and returns a list of E corresponding pairs. If one input list is short, excess elements of  the longer list are discarded.  Properties:  zip a b = zipWith (,) a b T       !"#$%&' !"#$%&'()*+,-./0123456789:;<4  !"#$%&'()*+,-./0123456789:;<4    !"#$%&'()*+,-./0123456789:;<(      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-.adaptive-containers-0.2Data.Adaptive.TupleData.Adaptive.Listghc-prim GHC.TypesGHC.Bool AdaptPairPairfstsndcurrypairuncurryfromPairtoPair AdaptListListemptyconsnullheadtailtoListfromListenumFromToListuncons++lastinitlengthmapreverse intersperse intercalatefoldlfoldl1foldrfoldr1concat concatMapandoranyallsumproductmaximumminimumscanlscanl1scanrscanr1iteraterepeat replicatecycleunfoldrtakedropsplitAtelemnotElemfilterziperrorEmptyList moduleErrorbottom PairCharChar PairCharFloatPairCharDoublePairCharWord64PairCharWord32PairCharWord16 PairCharWord8 PairCharWord PairCharInt64 PairCharInt32 PairCharInt16 PairCharInt8PairCharInteger PairCharInt PairFloatCharPairFloatFloatPairFloatDoublePairFloatWord64PairFloatWord32PairFloatWord16PairFloatWord8 PairFloatWordPairFloatInt64PairFloatInt32PairFloatInt16 PairFloatInt8PairFloatInteger PairFloatIntPairDoubleCharPairDoubleFloatPairDoubleDoublePairDoubleWord64PairDoubleWord32PairDoubleWord16PairDoubleWord8PairDoubleWordPairDoubleInt64PairDoubleInt32PairDoubleInt16PairDoubleInt8PairDoubleInteger PairDoubleIntPairWord64CharPairWord64FloatPairWord64DoublePairWord64Word64PairWord64Word32PairWord64Word16PairWord64Word8PairWord64WordPairWord64Int64PairWord64Int32PairWord64Int16PairWord64Int8PairWord64Integer PairWord64IntPairWord32CharPairWord32FloatPairWord32DoublePairWord32Word64PairWord32Word32PairWord32Word16PairWord32Word8PairWord32WordPairWord32Int64PairWord32Int32PairWord32Int16PairWord32Int8PairWord32Integer PairWord32IntPairWord16CharPairWord16FloatPairWord16DoublePairWord16Word64PairWord16Word32PairWord16Word16PairWord16Word8PairWord16WordPairWord16Int64PairWord16Int32PairWord16Int16PairWord16Int8PairWord16Integer PairWord16Int PairWord8CharPairWord8FloatPairWord8DoublePairWord8Word64PairWord8Word32PairWord8Word16PairWord8Word8 PairWord8WordPairWord8Int64PairWord8Int32PairWord8Int16 PairWord8Int8PairWord8Integer PairWord8Int PairWordChar PairWordFloatPairWordDoublePairWordWord64PairWordWord32PairWordWord16 PairWordWord8 PairWordWord PairWordInt64 PairWordInt32 PairWordInt16 PairWordInt8PairWordInteger PairWordInt PairInt64CharPairInt64FloatPairInt64DoublePairInt64Word64PairInt64Word32PairInt64Word16PairInt64Word8 PairInt64WordPairInt64Int64PairInt64Int32PairInt64Int16 PairInt64Int8PairInt64Integer PairInt64Int PairInt32CharPairInt32FloatPairInt32DoublePairInt32Word64PairInt32Word32PairInt32Word16PairInt32Word8 PairInt32WordPairInt32Int64PairInt32Int32PairInt32Int16 PairInt32Int8PairInt32Integer PairInt32Int PairInt16CharPairInt16FloatPairInt16DoublePairInt16Word64PairInt16Word32PairInt16Word16PairInt16Word8 PairInt16WordPairInt16Int64PairInt16Int32PairInt16Int16 PairInt16Int8PairInt16Integer PairInt16Int PairInt8Char PairInt8FloatPairInt8DoublePairInt8Word64PairInt8Word32PairInt8Word16 PairInt8Word8 PairInt8Word PairInt8Int64 PairInt8Int32 PairInt8Int16 PairInt8Int8PairInt8Integer PairInt8IntPairIntegerCharPairIntegerFloatPairIntegerDoublePairIntegerWord64PairIntegerWord32PairIntegerWord16PairIntegerWord8PairIntegerWordPairIntegerInt64PairIntegerInt32PairIntegerInt16PairIntegerInt8PairIntegerIntegerPairIntegerInt PairIntChar PairIntFloat PairIntDouble PairIntWord64 PairIntWord32 PairIntWord16 PairIntWord8 PairIntWord PairIntInt64 PairIntInt32 PairIntInt16 PairIntInt8PairIntInteger PairIntIntPBoolPUnitPairPairunPairIntTrueFalseConsChar EmptyChar ConsFloat EmptyFloat ConsDouble EmptyDouble ConsWord64 EmptyWord64 ConsWord32 EmptyWord32 ConsWord16 EmptyWord16 ConsWord8 EmptyWord8ConsWord EmptyWord ConsInt64 EmptyInt64 ConsInt32 EmptyInt32 ConsInt16 EmptyInt16ConsInt8 EmptyInt8 ConsInteger EmptyIntegerConsIntEmptyIntConsBool EmptyBoolConsPairIntIntEmptyPairIntInt