{Fi*      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                               Safe It holds: )foldMap f . Mapped g = foldMap f . fmap g but use of  avoids  constraint. !  !Safe We need to distinguish between   and  , since there is an instance Sort Set but there cannot be an instance SortBy Set.qCreate a container with as many copies as possible of a given value. That is, for a container with fixed size n, the call repeat x will generate a container with n copies of x. It must hold: Kfmap f xs = zipWith (\x _ -> f x) xs xs = zipWith (\_ x -> f x) xs xs)Default implementation for   based on  .]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\*  !"#$%&'()] !\[ZYXWVUT"SRQPONMLKJIH#GFEDCBA@?$%&'(>= <; :987) 6543210/.-,+*L    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\55Safe]^_`abcdefghijklmnop]^]^ponmlkjihgfedcba`_]^_`abcdefghijklmnopSafes#Make a list as long as another one "\Check whether two lists with different element types have equal length. It is equivalent to length xs == length ys but more efficient.#JCompare the length of two lists over different types. It is equivalent to !(compare (length xs) (length ys)) but more efficient.t the same as ($>)s"#tststs"#tSafe uvwxyz{|}uvwx uvwx}|{zyuvwxyz{|}Safe~DWrap a container such that its Applicative instance is based on zip.bAlways returns a rectangular list by clipping all dimensions to the shortest slice. Be aware that transpose [] == repeat [].~~~~ SafeBInsert an element into an ordered list while preserving the order. The type R can be used for many kinds of list-like structures with restrictions on the size. T [] a0 is a lazy list containing at least one element. T (T []) a1 is a lazy list containing at least two elements. T Vector a is a vector with at least one element. You may also use unboxed vectors but the first element will be stored in a box and you will not be able to use many functions from this module. T Maybe a- is a list that contains one or two elements.Maybe is isomorphic to Optional Empty. T Empty a- is a list that contains exactly one element. T (T Empty) a. is a list that contains exactly two elements.Optional (T Empty) a. is a list that contains zero or two elements.You can create a list type for every finite set of allowed list length by nesting Optional and NonEmpty constructors. If list length n is allowed, then place Optional at depth n#, if it is disallowed then place NonEmpty$. The maximum length is marked by Empty.#Force immediate generation of Cons.Implementation of   without the   constraint that is needed for  .Implementation of  without the   constraint that is needed for . Synonym for . For symmetry to . It holds: !foldl1Map f g = foldl1 f . fmap gbut  does not need a  instance.)Fold a non-empty list in a balanced way. BalancedP means that each element has approximately the same depth in the operator tree. Approximately the same depth means that the difference between maximum and minimum depth is at most 1. The accumulation operation must be associative and commutative in order to get the same result as  or foldr1.maximum is a total functionminimum is a total functionmaximumBy is a total functionminimumBy is a total functionmaximumKey is a total functionminimumKey is a total function$maximumKey is a total function%minimumKey is a total function+sum does not need a zero for initialization.product does not need a one for initializationgeneric variants:  or better Semigroup.cycleDefault implementation for  based on .MOnly advised for structures with efficient appending of single elements like Sequence!. Alternatively you may consider .&If you nest too many non-empty lists then the efficient merge-sort (linear-logarithmic runtime) will degenerate to an inefficient insert-sort (quadratic runtime).' Caution: $viewL (NonEmpty.Cons x []) = Nothing8 because the tail is empty, and thus cannot be NonEmpty!=This instance mainly exist to allow cascaded applications of .j()*+,-./012$%3456789:;<=>?@ABCDEFG&HIJKLMNO'PQRSTUVWXYZ[G()*+,-./012$%3456789:a()*+,-./012$%3456789:;<=>?@ABCDEFG&HIJKLMNO'PQRSTUVWXYZ[5555Safe22Safe#Select tuples of list elements: choose "abc" == ['a'!:'b'!:empty,'a'!:'c'!:empty,'b'!:'c'!:empty]8This implementation is more efficient for Sequence than .Safe\]^\]^\]^SafeWe cannot have a reasonable instance Insert Set , since the instance Insert (NonEmpty Set)4 would preserve duplicate leading elements, whereas _ does not. However, the instance Insert NonEmpty( is not the problem. A general type like :insertSet :: (Insert f, Ord a) => a -> f a -> NonEmpty f a,cannot work, since it can be instantiated to HinsertSet :: (Ord a) => a -> NonEmpty Set a -> NonEmpty (NonEmpty Set) aand this is obviously wrong: insertSet x (singleton x) has only one element, not two.`a`a Safebcbc Safe             5d !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs4tuvwxyz{|}~s4tus4tu   s 4 5 3 , 1 / *  (  /$s,tu s , t u s  4 x y z { v w | } t u    y            x z v w {     }   t u   4 4 $non-empty-0.3-LHRkfB03IENCgGXBwLRKlkData.NonEmpty.Class Data.EmptyData.NonEmpty.Match Data.AppendData.Zip Data.NonEmptyData.NonEmpty.MixedData.NonEmpty.SetData.NonEmpty.Map Data.OptionalData.NonEmpty.FoldableData.NonEmptyPrivate Applicative<*>pureMonad>>=returnData.Monoid.HTcycleData.NonEmptyTestNFDatarnf Arbitrary arbitraryshrinkShow showsPrecReversereverseSortBysortBySortsortIterateiterateRepeatrepeatZipzipWithAppendappend Singleton singletonViewViewRviewRViewLviewLSnocsnocConsconsEmptyempty snocDefault viewRDefaultzipWith3zipWith4zipzip3zip4 sortDefault $fNFDataMap $fNFDataSet $fNFData[] $fNFDataMaybe $fArbitrary[] $fShowSet$fShow[] $fReverseSeq$fReverseMaybe $fReverse[] $fSortBySeq $fSortByMaybe $fSortBy[] $fSortSet $fSortSeq $fSortMaybe$fSort[]$fIterateMaybe $fIterate[] $fRepeatMaybe $fRepeat[]$fZipSeq $fZipMaybe$fZip[] $fAppendSeq $fAppend[]$fSingletonSeq$fSingletonSet$fSingletonMaybe $fSingleton[] $fViewSeq $fViewSet $fViewMaybe$fView[] $fViewRSeq $fViewRSet $fViewRMaybe $fViewR[] $fViewLSeq $fViewLSet $fViewLMaybe $fViewL[] $fSnocSeq$fSnoc[] $fConsSeq$fCons[] $fEmptySeq $fEmptyMap $fEmptySet $fEmptyMaybe $fEmpty[]T $fNFDataT $fNFDataT0 $fIterateT $fRepeatT $fSortByT$fSortT $fReverseT$fZipT$fEmptyT $fArbitraryT$fViewT$fViewRT$fViewLT$fTraversableT $fFoldableT $fFunctorT$fShowT$fShowT0$fEqT$fOrdTtake replicatefstsnddecons transposeClip$fApplicativeTInsertByinsertByInsertinsertheadtail!:forceapplybindtoListflattenfetchmapHeadmapTailinitlastfoldl1 foldl1Map foldBalancedfoldBalancedStrictmaximumminimum maximumBy minimumBy maximumKey minimumKeysumproduct appendRight appendLeft insertDefault removeEachtailsinitsinitsRevscanlscanr mapAdjacentChoosechoosegroupBy groupPairsgroupKey groupEithers segmentAfter segmentBeforefilterToInfixessplitAt sliceVertical $fChoose[] $fChooseT $fChooseT0membersizefindMinfindMax deleteMin deleteMax deleteFindMin deleteFindMaxminViewmaxViewfromList toAscListunion unionLeft unionRightelemskeyskeysSetlookupminViewWithKeymaxViewWithKeymap mapWithKeyNil fromEmpty fromNonEmpty?: $fInsertByT $fInsertT$fConsTMappedbaseGHC.BaseFunctor$fFoldableMapped _equalLength_compareLength _maximumKey _minimumKeyTransposeInnertransposeStart zipHeadTailTransposeOuter transposeAuxsnocAltfoldBalancedGen attachKeyinsertByTraversable mapWithIndexremoveAttransposePrelude propTransposepropTransposePrelude mapAdjacent1$fTransposeInner[]$fTransposeOuter[] $fInsertBySeq$fInsertByMaybe $fInsertBy[] $fInsertByT0 $fInsertSeq $fInsertMaybe $fInsert[] $fInsertT0 $fAppendT $fSingletonT$fSnocT$fArbitraryAux $fArbitraryT0$fMonadTfilterToInfixesAltcontainers-0.5.7.1 Data.Set.BaseSet insertGen