!?l      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                                         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                               !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk(c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimentalportableSafeWvector Box monadvectorIdentity monad vectorFDelay inlining a function until late in the game (simplifier phase 0). vectorl inlined in phase 0    (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimentalportableSafe_ vector Size hintvector Exact sizevectorUpper bound on the sizevector Unknown sizevector;Subtract two sizes with clamping to 0, for drop-like thingsvectorMinimum of two size hintsvectorMaximum of two size hintsvector%Convert a size hint to an upper boundvector)Compute the minimum size from a size hintvector5Compute the maximum size from a size hint if possible   (c) Roman Leshchinskiy 2008-2011 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone@AHV: vectorCClass of mutable vectors parametrised with a primitive state token.!vectorNLength of the mutable vector. This method should not be called directly, use m instead."vectorgYield a part of the mutable vector without copying it. This method should not be called directly, use  unsafeSlice instead.#vectorSCheck whether two vectors overlap. This method should not be called directly, use overlaps instead.$vector]Create a mutable vector of the given length. This method should not be called directly, use  unsafeNew instead.%vectorInitialize a vector to a standard value. This is intended to be called as part of the safe new operation (and similar operations), to properly blank the newly allocated memory if necessary.\Vectors that are necessarily initialized as part of creation may implement this as a no-op.&vectorCreate a mutable vector of the given length and fill it with an initial value. This method should not be called directly, use n instead.'vectorYYield the element at the given position. This method should not be called directly, use  unsafeRead instead.(vector[Replace the element at the given position. This method should not be called directly, use  unsafeWrite instead.)vectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors. This method should not be called directly, use clear instead.*vectorcSet all elements of the vector to the given value. This method should not be called directly, use set instead.+vector`Copy a vector. The two vectors may not overlap. This method should not be called directly, use  unsafeCopy instead.,vectorlMove the contents of a vector. The two vectors may overlap. This method should not be called directly, use  unsafeMove instead.-vector_Grow a vector by the given number of elements. This method should not be called directly, use  unsafeGrow instead."vectorstarting indexvectorlength of the slice+vectortargetvectorsource,vectortargetvectorsource !"#$%&'()*+,- !"#$%&'()*+,- (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone >@AHSVX2 .vectorgClass of immutable vectors. Every immutable vector is associated with its mutable version through the 6K type family. Methods of this class should not be used directly. Instead, Data.Vector.GenericB and other Data.Vector modules provide safe and fusible wrappers. Minimum complete implementation:/0123/vectorAssumed complexity: O(1)Unsafely convert a mutable vector to its immutable version without copying. The mutable vector may not be used after this operation.0vectorAssumed complexity: O(1)Unsafely convert an immutable vector to its mutable version without copying. The immutable vector may not be used after this operation.1vectorAssumed complexity: O(1)Yield the length of the vector.2vectorAssumed complexity: O(1)OYield a slice of the vector without copying it. No range checks are performed.3vectorAssumed complexity: O(1)SYield the element at the given position in a monad. No range checks are performed.IThe monad allows us to be strict in the vector if we want. Suppose we had unsafeIndex :: v a -> Int -> aCinstead. Now, if we wanted to copy a vector, we'd do something like :copy mv v ... = ... unsafeWrite mv i (unsafeIndex v i) ...For lazy vectors, the indexing would not be evaluated which means that we would retain a reference to the original vector in each element we write. This is not what we want!With 3 , we can do gcopy mv v ... = ... case basicUnsafeIndexM v i of Box x -> unsafeWrite mv i x ...lwhich does not have this problem because indexing (but not the returned element!) is evaluated immediately.4vectorAssumed complexity: O(n)pCopy an immutable vector into a mutable one. The two vectors must have the same length but this is not checked. Instances of .X should redefine this method if they wish to support an efficient block copy operation.%Default definition: copying basic on 3 and basicUnsafeWrite.5vector Evaluate a2 as far as storing it in a vector would and yield b. The v a argument only fixes the type and is not touched. The method is only used for optimisation purposes. Thus, it is safe for instances of . to evaluate a^ less than it would be when stored in a vector although this might result in suboptimal code. 2elemseq v x y = (singleton x `asTypeOf` v) `seq` yDefault defintion: a is not evaluated at all6vector Mutable v s a0 is the mutable version of the pure vector type v a with the state token s%. It is injective on GHC 8 and newer.2vectorstarting indexvectorlength .124/0356(c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNoneF. 7:89;<=>?@A 7:89;<=>?@Ao3p2 (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone&'=?@AEHSXWCvectorMonadic streamsEvector*Result of taking a single step in a streamIvector Length of a CJvector Check if a C is emptyKvectorEmpty CLvector Singleton CMvector#Replicate a value to a given lengthNvectorYield a CO of values obtained by performing the monadic action the given number of timesPvector"Generate a stream from its indicesQvectorPrepend an elementRvectorAppend an elementSvectorConcatenate two CsTvectorFirst element of the C or error if emptyUvectorLast element of the C or error if emptyVvectorElement at the given positionWvector!Element at the given position or q if out of boundsXvectorGExtract a substream of the given length starting at the given position.YvectorAll but the last elementZvectorAll but the first element[vector The first n elements\vectorAll but the first n elements]vectorMap a function over a C^vectorMap a monadic function over a C_vector1Execute a monadic action for each element of the C`vector Transform a C to use a different monadbvectorPair each element in a C with its indexcvectorPair each element in a C; with its index, starting from the right and counting downdvectorZip two C!s with the given monadic functiontvector Check if two C s are equaluvectorLexicographically compare two Csvvector0Drop elements which do not satisfy the predicatexvector8Drop elements which do not satisfy the monadic predicateyvector Drop repeated adjacent elements.zvector5Longest prefix of elements that satisfy the predicate{vector=Longest prefix of elements that satisfy the monadic predicate|vector>Drop the longest prefix of elements that satisfy the predicate}vectorFDrop the longest prefix of elements that satisfy the monadic predicate~vectorCheck whether the C contains an elementvector Inverse of ~vectorYield r3 the first element that satisfies the predicate or q if no such element exists.vectorYield r< the first element that satisfies the monadic predicate or q if no such element exists.vectorYield rA the index of the first element that satisfies the predicate or q if no such element exists.vectorYield rI the index of the first element that satisfies the monadic predicate or q if no such element exists.vector Left foldvector!Left fold with a monadic operatorvectorSame as vectorLeft fold over a non-empty CvectorLeft fold over a non-empty C with a monadic operatorvectorSame as vector#Left fold with a strict accumulatorvector:Left fold with a strict accumulator and a monadic operatorvectorSame as vectorLeft fold over a non-empty C with a strict accumulatorvectorLeft fold over a non-empty C2 with a strict accumulator and a monadic operatorvectorSame as vector Right foldvector"Right fold with a monadic operatorvector"Right fold over a non-empty streamvector:Right fold over a non-empty stream with a monadic operatorvector Create a C of values from a C of streamable thingsvectorUnfoldvectorUnfold with a monadic functionvectorUnfold at most n" elements with a monadic functionsvectorJApply monadic function n times to value. Zeroth element is original value.vectorBApply function n times to value. Zeroth element is original value.vector Prefix scanvector#Prefix scan with a monadic operatorvector#Prefix scan with strict accumulatorvector:Prefix scan with strict accumulator and a monadic operatorvector Suffix scanvector#Suffix scan with a monadic operatorvector#Suffix scan with strict accumulatorvector;Suffix scan with strict acccumulator and a monadic operatorvectorHaskell-style scanvector*Haskell-style scan with a monadic operatorvector*Haskell-style scan with strict accumulatorvectorAHaskell-style scan with strict accumulator and a monadic operatorvectorScan over a non-empty CvectorScan over a non-empty C with a monadic operatorvectorScan over a non-empty C with a strict accumulatorvectorScan over a non-empty C2 with a strict accumulator and a monadic operatorvectorYield a C+ of the given length containing the values x, x+y, x+y+y etc.vectorEnumerate valuesWARNING:B This operation can be very inefficient. If at all possible, use  instead.vector#Enumerate values with a given step.WARNING:> This operation is very inefficient. If at all possible, use  instead.vector Convert a C to a listvectorConvert a list to a CvectorConvert the first n elements of a list to a BundleXvectorstarting indexvectorlengthuCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~uCDEFGHIJKLQRMNOPSTUVWXYZ[\]^_`abcedfghijklmnopqrstuvxywz{|}~S5V9 W9 ~44  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone&'=?@AEHSXDMYvectorMonadic streamsvector hint of a vector Attach a  hint to a vector Length of a vector Check if a  is emptyvectorEmpty vector Singleton vector#Replicate a value to a given lengthvectorYield a O of values obtained by performing the monadic action the given number of timesvector"Generate a stream from its indicesvectorPrepend an elementvectorAppend an elementvectorConcatenate two svectorFirst element of the  or error if emptyvectorLast element of the  or error if emptyvectorElement at the given positionvector!Element at the given position or q if out of boundsvectorGExtract a substream of the given length starting at the given position.vectorAll but the last elementvectorAll but the first elementvector The first n elementsvectorAll but the first n elementsvectorMap a function over a vectorMap a monadic function over a vector1Execute a monadic action for each element of the vector Transform a  to use a different monadvectorPair each element in a  with its indexvectorPair each element in a ; with its index, starting from the right and counting downvectorZip two !s with the given monadic functionvector Check if two  s are equalvectorLexicographically compare two svector0Drop elements which do not satisfy the predicatevector8Drop elements which do not satisfy the monadic predicatevector5Longest prefix of elements that satisfy the predicatevector=Longest prefix of elements that satisfy the monadic predicatevector>Drop the longest prefix of elements that satisfy the predicatevectorFDrop the longest prefix of elements that satisfy the monadic predicatevectorCheck whether the  contains an elementvector Inverse of vectorYield r3 the first element that satisfies the predicate or q if no such element exists.vectorYield r< the first element that satisfies the monadic predicate or q if no such element exists.vectorYield rA the index of the first element that satisfies the predicate or q if no such element exists.vectorYield rI the index of the first element that satisfies the monadic predicate or q if no such element exists.vector Left foldvector!Left fold with a monadic operatorvectorSame as vectorLeft fold over a non-empty vectorLeft fold over a non-empty  with a monadic operatorvectorSame as vector#Left fold with a strict accumulatorvector:Left fold with a strict accumulator and a monadic operatorvectorSame as vectorLeft fold over a non-empty  with a strict accumulatorvectorLeft fold over a non-empty 2 with a strict accumulator and a monadic operatorvectorSame as  vector Right fold vector"Right fold with a monadic operator vector"Right fold over a non-empty stream vector:Right fold over a non-empty stream with a monadic operatorvector Create a  of values from a  of streamable thingsvectorUnfoldvectorUnfold with a monadic functionvectorUnfold at most n elementsvectorUnfold at most n" elements with a monadic functionsvectorJApply monadic function n times to value. Zeroth element is original value.vectorBApply function n times to value. Zeroth element is original value.vector Prefix scanvector#Prefix scan with a monadic operatorvector#Prefix scan with strict accumulatorvector:Prefix scan with strict accumulator and a monadic operatorvector Suffix scanvector#Suffix scan with a monadic operatorvector#Suffix scan with strict accumulatorvector;Suffix scan with strict acccumulator and a monadic operator vectorHaskell-style scan!vector*Haskell-style scan with a monadic operator"vector*Haskell-style scan with strict accumulator#vectorAHaskell-style scan with strict accumulator and a monadic operator$vectorScan over a non-empty %vectorScan over a non-empty  with a monadic operator&vectorScan over a non-empty  with a strict accumulator'vectorScan over a non-empty 2 with a strict accumulator and a monadic operator(vectorYield a + of the given length containing the values x, x+y, x+y+y etc.)vectorEnumerate valuesWARNING:B This operation can be very inefficient. If at all possible, use ( instead.*vector#Enumerate values with a given step.WARNING:> This operation is very inefficient. If at all possible, use ( instead.+vector Convert a  to a list,vectorConvert a list to a -vectorConvert the first n elements of a list to a .vectorConvert a list to a  with the given  hint.vectorstarting indexvectorlength|      !"#$%&'()*+,-./012|      !"#$%&'()*+,-./20159 9 44  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone=?SX}D4vector$Alternative name for monadic streams5vectorThe type of pure streams7vector)Convert a pure stream to a monadic stream8vector hint of a 59vector Attach a  hint to a 5:vector Length of a 5;vector Check if a 5 is empty<vectorEmpty 5=vector Singleton 5>vector#Replicate a value to a given length?vector"Generate a stream from its indices@vectorPrepend an elementAvectorAppend an elementBvectorConcatenate two 5sCvectorFirst element of the 5 or error if emptyDvectorLast element of the 5 or error if emptyEvectorElement at the given positionFvector!Element at the given position or q if out of boundsGvectorGExtract a substream of the given length starting at the given position.HvectorAll but the last elementIvectorAll but the first elementJvector The first n elementsKvectorAll but the first n elementsLvectorMap a function over a 5OvectorPair each element in a 5 with its indexPvectorPair each element in a 5; with its index, starting from the right and counting downQvectorZip two 5s with the given functionRvector Zip three 5s with the given function[vector0Drop elements which do not satisfy the predicate\vector5Longest prefix of elements that satisfy the predicate]vector>Drop the longest prefix of elements that satisfy the predicate^vectorCheck whether the 5 contains an element_vector Inverse of ^`vectorYield r- the first element matching the predicate or q if no such element exists.avectorYield r; the index of the first element matching the predicate or q if no such element exists.bvector Left foldcvectorLeft fold on non-empty 5sdvector!Left fold with strict accumulatorevectorLeft fold on non-empty 5s with strict accumulatorfvector Right foldgvectorRight fold on non-empty 5sjvectorUnfoldkvectorUnfold at most n elementslvectorDApply function n-1 times to value. Zeroth element is original value.mvector Prefix scannvector#Prefix scan with strict accumulatorovector Suffix scanpvector#Suffix scan with strict accumulatorqvectorHaskell-style scanrvector*Haskell-style scan with strict accumulatorsvectorScan over a non-empty 5tvectorScan over a non-empty 5 with a strict accumulatoruvector Check if two 5 s are equalwvectorLexicographically compare two 5syvector\Apply a monadic action to each element of the stream, producing a monadic stream of resultszvector4Apply a monadic action to each element of the stream}vectorEYield a monadic stream of elements that satisfy the monadic predicate~vector Monadic foldvector"Monadic fold over non-empty streamvector$Monadic fold with strict accumulatorvector8Monad fold over non-empty stream with strict accumulatorvectorYield a 5+ of the given length containing the values x, x+y, x+y+y etc.vectorEnumerate valuesWARNING:C This operations can be very inefficient. If at all possible, use  instead.vector#Enumerate values with a given step.WARNING:? This operations is very inefficient. If at all possible, use  instead.vector Convert a 5 to a listvector Create a 5 from a listvector Create a 5 from the first n elements of a list %fromListN n xs = fromList (take n xs)vector Create a 5 of values from a 5 of streamable thingsGvectorstarting indexvectorlength`EFGH456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~`EFGH54689:;<=@A>?BCDEFGHIJKLNMOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst7yz{|}~uwvxB5E9 F9 ^4_4  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone >@AHVX$vector?Create a new mutable vector and fill it with elements from the 5A. The vector will grow exponentially if the maximum size of the 5 is unknown.vectorCreate a new mutable vector and fill it with elements from the monadic stream. The vector will grow exponentially if the maximum size of the stream is unknown.vector?Create a new mutable vector and fill it with elements from the 5A. The vector will grow exponentially if the maximum size of the 5 is unknown.svectorCreate a new mutable vector and fill it with elements from the monadic stream. The vector will grow exponentially if the maximum size of the stream is unknown.vector?Create a new mutable vector and fill it with elements from the 5U from right to left. The vector will grow exponentially if the maximum size of the 5 is unknown.vectorCreate a new mutable vector and fill it with elements from the monadic stream from right to left. The vector will grow exponentially if the maximum size of the stream is unknown.vectorLength of the mutable vector.vector!Check whether the vector is emptyvector6Yield a part of the mutable vector without copying it.vectorWYield a part of the mutable vector without copying it. No bounds checks are performed.vector"Check whether two vectors overlap.vector,Create a mutable vector of the given length.vectorKCreate a mutable vector of the given length. The memory is not initialized.vectormCreate a mutable vector of the given length (0 if the length is negative) and fill it with an initial value.vectorCreate a mutable vector of the given length (0 if the length is negative) and fill it with values produced by repeatedly executing the monadic action.vector"Create a copy of a mutable vector.vectorLGrow a vector by the given number of elements. The number must be positive.tvectorGrow a vector logarithmicallyvectordGrow a vector by the given number of elements. The number must be positive but this is not checked.vectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors.vector(Yield the element at the given position.vector*Replace the element at the given position.vector)Modify the element at the given position.vector)Swap the elements at the given positions.vectorDReplace the element at the give position and return the old element.vectorHYield the element at the given position. No bounds checks are performed.vectorJReplace the element at the given position. No bounds checks are performed.vectorIModify the element at the given position. No bounds checks are performed.vectorISwap the elements at the given positions. No bounds checks are performed.vectoreReplace the element at the give position and return the old element. No bounds checks are performed.vector2Set all elements of the vector to the given value.vectorNCopy a vector. The two vectors must have the same length and may not overlap.vectorJMove the contents of a vector. The two vectors must have the same length.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vectorcCopy a vector. The two vectors must have the same length and may not overlap. This is not checked.vectorcMove the contents of a vector. The two vectors must have the same length, but this is not checked.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vector~Compute the next (lexicographically) permutation of given vector in-place. Returns False when input is the last permtuationvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourceI !"#$%&'()*+,-I !"#$%&'()*+,-  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone>@ASX) (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone >@AHSVXҾvectorO(1) Yield the length of the vectorvectorO(1) Test whether a vector is emptyvector O(1) IndexingvectorO(1) Safe indexingvectorO(1) First elementvectorO(1) Last elementvectorO(1)( Unsafe indexing without bounds checkingvectorO(1)6 First element without checking if the vector is emptyvectorO(1)5 Last element without checking if the vector is emptyvectorO(1) Indexing in a monad.xThe monad allows operations to be strict in the vector when necessary. Suppose vector copying is implemented like this: &copy mv v = ... write mv i (v ! i) ...For lazy vectors, v ! i) would not be evaluated which means that mv, would unnecessarily retain a reference to v in each element written.With /, copying can be implemented like this instead: Scopy mv v = ... do x <- indexM v i write mv i xHere, no references to v$ are retained because indexing (but not% the elements) is evaluated eagerly.vectorO(1)+ First element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)* Last element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)0 Indexing in a monad without bounds checks. See + for an explanation of why this is useful.vectorO(1)C First element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)B Last element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)S Yield a slice of the vector without copying it. The vector must contain at least i+n elements.vectorO(1)N Yield all but the last element without copying. The vector may not be empty.vectorO(1)O Yield all but the first element without copying. The vector may not be empty.vectorO(1) Yield the first n= elements without copying. The vector may contain less than n1 elements in which case it is returned unchanged.vectorO(1) Yield all but the first n= elements without copying. The vector may contain less than n4 elements in which case an empty vector is returned.vectorO(1) Yield the first n4 elements paired with the remainder without copying. Note that  n v is equivalent to ( n v,  n v) but slightly more efficient.vectorO(1)P Yield a slice of the vector without copying. The vector must contain at least i+n" elements but this is not checked.vectorO(1)f Yield all but the last element without copying. The vector may not be empty but this is not checked.vectorO(1)g Yield all but the first element without copying. The vector may not be empty but this is not checked.vectorO(1) Yield the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Yield all but the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Empty vectorvectorO(1) Vector with exactly one elementvectorO(n)@ Vector of the given length with the same value in each positionvectorO(n)O Construct a vector of the given length by applying the function to each indexvectorO(n)C Apply function n times to value. Zeroth element is original value.vectorO(n)l Construct a vector by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. Uunfoldr (\n -> if n == 0 then Nothing else Just (n,n-1)) 10 = <10,9,8,7,6,5,4,3,2,1>vectorO(n)! Construct a vector with at most nb elements by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. -unfoldrN 3 (\n -> Just (n,n-1)) 10 = <10,9,8>vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n) Construct a vector with ng elements by repeatedly applying the generator function to the already constructed part of the vector. DconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in f <a,b,c>vectorO(n) Construct a vector with n{ elements from right to left by repeatedly applying the generator function to the already constructed part of the vector. DconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in f <c,b,a>vectorO(n): Yield a vector of the given length containing the values x, x+15 etc. This operation is usually more efficient than . enumFromN 5 3 = <5,6,7>vectorO(n): Yield a vector of the given length containing the values x, x+y, x+y+y5 etc. This operations is usually more efficient than  . +enumFromStepN 1 0.1 5 = <1,1.1,1.2,1.3,1.4>vectorO(n) Enumerate values from x to y.WARNING:B This operation can be very inefficient. If at all possible, use  instead. vectorO(n) Enumerate values from x to y with a specific step z.WARNING:B This operation can be very inefficient. If at all possible, use  instead. vectorO(n) Prepend an element vectorO(n) Append an element vectorO(m+n) Concatenate two vectors vectorO(n)$ Concatenate all vectors in the listvectorO(n). Concatenate all vectors in the non-empty listvectorO(n)Y Execute the monadic action the given number of times and store the results in a vector.vectorO(n)U Construct a vector of the given length by applying the monadic action to each indexvectorO(n)K Apply monadic function n times to value. Zeroth element is original value.vector;Execute the monadic action and freeze the resulting vector. create (do { v <-  2;  v 0 'a';  v 1 'b'; return v }) = <a,b> vector<Execute the monadic action and freeze the resulting vectors.vectorO(n)Y Yield the argument but force it not to retain any extra memory, possibly by copying it.@This is especially useful when dealing with slices. For example: force (slice 0 2 <huge vector>)Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected.vectorO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7>vectorO(m+n) For each pair (i,a)O from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value aO from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>)This function is useful for instances of .& that cannot store pairs. Otherwise,  is probably more convenient. update_ xs is ys =  xs (9 is ys) vector Same as () but without bounds checking.vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4>vectorO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value bT from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>)This function is useful for instances of .& that cannot store pairs. Otherwise,  is probably more convenient: accumulate_ f as is bs =  f as (9 is bs) vectorSame as  but without bounds checking.vectorSame as  but without bounds checking. vectorSame as  but without bounds checking.!vectorO(n) Reverse a vector"vectorO(n)5 Yield the vector obtained by replacing each element i of the index vector by xsi. This is equivalent to & (xs) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>#vectorSame as " but without bounds checking.$vectorApply a destructive operation to a vector. The operation will be performed in place if it is safe to do so and will modify a copy of the vector otherwise. modify (\v ->  v 0 'x') ( 3 'a') = <'x','a','a'> %vectorO(n)- Pair each element in a vector with its index&vectorO(n) Map a function over a vector'vectorO(n)< Apply a function to every element of a vector and its index(vector9Map a function over a vector and concatenate the results.)vectorO(n)V Apply the monadic action to all elements of the vector, yielding a vector of results*vectorO(n)c Apply the monadic action to every element of a vector and its index, yielding a vector of results+vectorO(n)M Apply the monadic action to all elements of a vector and ignore the results,vectorO(n)[ Apply the monadic action to every element of a vector and its index, ignoring the results-vectorO(n)f Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip )..vectorO(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip +./vector O(min(m,n))) Zip two vectors with the given function.0vector*Zip three vectors with the given function.4vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices.9vector O(min(m,n)) Zip two vectors>vector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of results?vector O(min(m,n))k Zip the two vectors with a monadic action that also takes the element index and yield a vector of results@vector O(min(m,n))D Zip the two vectors with the monadic action and ignore the resultsAvector O(min(m,n))d Zip the two vectors with a monadic action that also takes the element index and ignore the resultsBvector O(min(m,n)) Unzip a vector of pairs.GvectorO(n)0 Drop elements that do not satisfy the predicateHvectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indicesIvectorO(n)! Drop repeated adjacent elements.JvectorO(n)- Drop elements when predicate returns NothingKvectorO(n)J Drop elements when predicate, applied to index and value, returns NothingLvectorO(n)8 Drop elements that do not satisfy the monadic predicateMvectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.NvectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.OvectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The relative order of the elements is preserved at the cost of a sometimes reduced performance compared to P.PvectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The order of the elements is not preserved but the operation is often faster than O.QvectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.RvectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.SvectorO(n)( Check if the vector contains an elementTvectorO(n)= Check if the vector does not contain an element (inverse of S)UvectorO(n) Yield r- the first element matching the predicate or q if no such element exists.VvectorO(n) Yield r; the index of the first element matching the predicate or q if no such element exists.WvectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.XvectorO(n) Yield r; the index of the first occurence of the given element or qO if the vector does not contain the element. This is a specialised version of V.YvectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of W.ZvectorO(n) Left fold[vectorO(n) Left fold on non-empty vectors\vectorO(n)" Left fold with strict accumulator]vectorO(n)7 Left fold on non-empty vectors with strict accumulator^vectorO(n) Right fold_vectorO(n) Right fold on non-empty vectors`vectorO(n)% Right fold with a strict accumulatoravectorO(n)8 Right fold on non-empty vectors with strict accumulatorbvectorO(n); Left fold (function applied to each element and its index)cvectorO(n)T Left fold with strict accumulator (function applied to each element and its index)dvectorO(n)< Right fold (function applied to each element and its index)evectorO(n)U Right fold with strict accumulator (function applied to each element and its index)fvectorO(n)- Check if all elements satisfy the predicate.gvectorO(n). Check if any element satisfies the predicate.hvectorO(n) Check if all elements are uivectorO(n) Check if any element is ujvectorO(n) Compute the sum of the elementskvectorO(n)$ Compute the produce of the elementslvectorO(n)G Yield the maximum element of the vector. The vector may not be empty.mvectorO(n)r Yield the maximum element of the vector according to the given comparison function. The vector may not be empty.nvectorO(n)G Yield the minimum element of the vector. The vector may not be empty.ovectorO(n)r Yield the minimum element of the vector according to the given comparison function. The vector may not be empty.pvectorO(n)T Yield the index of the maximum element of the vector. The vector may not be empty.qvectorO(n) Yield the index of the maximum element of the vector according to the given comparison function. The vector may not be empty.rvectorO(n)T Yield the index of the minimum element of the vector. The vector may not be empty.svectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.tvectorO(n) Monadic folduvectorO(n)< Monadic fold (action applied to each element and its index)vvectorO(n)$ Monadic fold over non-empty vectorswvectorO(n)% Monadic fold with strict accumulatorxvectorO(n)U Monadic fold with strict accumulator (action applied to each element and its index)yvectorO(n)< Monadic fold over non-empty vectors with strict accumulatorzvectorO(n)& Monadic fold that discards the result{vectorO(n)V Monadic fold that discards the result (action applied to each element and its index)|vectorO(n)= Monadic fold over non-empty vectors that discards the result}vectorO(n)> Monadic fold with strict accumulator that discards the result~vectorO(n)n Monadic fold with strict accumulator that discards the result (action applied to each element and its index)vectorO(n)T Monad fold over non-empty vectors with strict accumulator that discards the resultvector,Evaluate each action and collect the resultsvector,Evaluate each action and discard the resultsvectorO(n) Prescan prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>vectorO(n) Prescan with strict accumulatorvectorO(n) Scan postscanl f z =  .  f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>vectorO(n) Scan with strict accumulatorvectorO(n) Haskell-style scan Sscanl f z <x1,...,xn> = <y1,...,y(n+1)> where y1 = z yi = f y(i-1) x(i-1) Example: $scanl (+) 0 <1,2,3,4> = <0,1,3,6,10>vectorO(n)+ Haskell-style scan with strict accumulatorvectorO(n)" Scan over a vector with its indexvectorO(n)- Scan over a vector (strictly) with its indexvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xivectorO(n)7 Scan over a non-empty vector with a strict accumulatorvectorO(n) Right-to-left prescan prescanr f z = ! .  (flip f) z . ! vectorO(n). Right-to-left prescan with strict accumulatorvectorO(n) Right-to-left scanvectorO(n)+ Right-to-left scan with strict accumulatorvectorO(n)! Right-to-left Haskell-style scanvectorO(n)9 Right-to-left Haskell-style scan with strict accumulatorvectorO(n)0 Right-to-left scan over a vector with its indexvectorO(n); Right-to-left scan over a vector (strictly) with its indexvectorO(n)+ Right-to-left scan over a non-empty vectorvectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorvectorO(n) Convert a vector to a listvectorO(n) Convert a list to a vectorvectorO(n) Convert the first n elements of a list to a vector fromListN n xs =  ( n xs) vectorO(n) Convert different vector typesvectorO(1) Unsafe convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.vectorO(n)/ Yield an immutable copy of the mutable vector.vectorO(1) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.vectorO(n). Yield a mutable copy of the immutable vector.vectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.vectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.vectorO(1) Convert a vector to a 5vectorO(n) Construct a vector from a 5vectorO(1) Convert a vector to a 5, proceeding from right to leftvectorO(n) Construct a vector from a 5, proceeding from right to leftvector.Construct a vector from a monadic initialiser.vectorSConvert a vector to an initialiser which, when run, produces a copy of the vector.vectorO(n)% Check if two vectors are equal. All ." instances are also instances of vh and it is usually more appropriate to use those. This function is primarily intended for implementing v! instances for new vector types.vectorO(n)vectorO(n), Compare two vectors lexicographically. All ." instances are also instances of wh and it is usually more appropriate to use those. This function is primarily intended for implementing w! instances for new vector types.vectorO(n)vectorGeneric definition of vectorGeneric definition of vectorNote: uses xvectorGeneric definion of  that views a . as a list. vectori starting indexvectorn lengthvectori starting indexvectorn lengthvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectorinitial vector (of length m)vector'vector of index/value pairs (of length n)vectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)vectoraccumulating function fvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vector'vector of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)"vectorxs value vectorvectoris index vector (of length n).124/0356      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.124/0356      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnorspqtuwxvyz{}~|9 9  5S4T4  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHV.Qvector7Mutable boxed vectors keyed on the monad they live in (y or ST s).vectorLength of the mutable vector.vector!Check whether the vector is emptyvector6Yield a part of the mutable vector without copying it.vectorWYield a part of the mutable vector without copying it. No bounds checks are performed.vector"Check whether two vectors overlap.vector,Create a mutable vector of the given length.vectorKCreate a mutable vector of the given length. The memory is not initialized.vectormCreate a mutable vector of the given length (0 if the length is negative) and fill it with an initial value.vectorCreate a mutable vector of the given length (0 if the length is negative) and fill it with values produced by repeatedly executing the monadic action.vector"Create a copy of a mutable vector.vectorLGrow a vector by the given number of elements. The number must be positive.vectordGrow a vector by the given number of elements. The number must be positive but this is not checked.vectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors.vector(Yield the element at the given position.vector*Replace the element at the given position.vector)Modify the element at the given position.vector)Swap the elements at the given positions.vectorHYield the element at the given position. No bounds checks are performed.vectorJReplace the element at the given position. No bounds checks are performed.vectorIModify the element at the given position. No bounds checks are performed.vectorISwap the elements at the given positions. No bounds checks are performed.vector2Set all elements of the vector to the given value.vectorNCopy a vector. The two vectors must have the same length and may not overlap.vectorcCopy a vector. The two vectors must have the same length and may not overlap. This is not checked.vectorJMove the contents of a vector. The two vectors must have the same length.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vectorcMove the contents of a vector. The two vectors must have the same length, but this is not checked.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vector~Compute the next (lexicographically) permutation of given vector in-place. Returns False when input is the last permtuationvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsource(( (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHSVXQevector,Boxed vectors, supporting efficient slicing.vectorO(1) Yield the length of the vectorvectorO(1) Test whether a vector is emptyvector O(1) IndexingvectorO(1) Safe indexingvectorO(1) First elementvectorO(1) Last elementvectorO(1)( Unsafe indexing without bounds checkingvectorO(1)6 First element without checking if the vector is emptyvectorO(1)5 Last element without checking if the vector is emptyvectorO(1) Indexing in a monad.xThe monad allows operations to be strict in the vector when necessary. Suppose vector copying is implemented like this: &copy mv v = ... write mv i (v ! i) ...For lazy vectors, v ! i) would not be evaluated which means that mv, would unnecessarily retain a reference to v in each element written.With /, copying can be implemented like this instead: Scopy mv v = ... do x <- indexM v i write mv i xHere, no references to v$ are retained because indexing (but not% the elements) is evaluated eagerly.vectorO(1)+ First element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)* Last element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)0 Indexing in a monad without bounds checks. See + for an explanation of why this is useful.vectorO(1)C First element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)B Last element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)S Yield a slice of the vector without copying it. The vector must contain at least i+n elements.vectorO(1)N Yield all but the last element without copying. The vector may not be empty.vectorO(1)O Yield all but the first element without copying. The vector may not be empty.vectorO(1) Yield at the first n= elements without copying. The vector may contain less than n1 elements in which case it is returned unchanged.vectorO(1) Yield all but the first n= elements without copying. The vector may contain less than n4 elements in which case an empty vector is returned.vectorO(1) Yield the first n4 elements paired with the remainder without copying. Note that  n v is equivalent to ( n v,  n v) but slightly more efficient.vectorO(1)P Yield a slice of the vector without copying. The vector must contain at least i+n" elements but this is not checked.vectorO(1)f Yield all but the last element without copying. The vector may not be empty but this is not checked.vectorO(1)g Yield all but the first element without copying. The vector may not be empty but this is not checked.vectorO(1) Yield the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Yield all but the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Empty vectorvectorO(1) Vector with exactly one elementvectorO(n)@ Vector of the given length with the same value in each positionvectorO(n)O Construct a vector of the given length by applying the function to each indexvectorO(n)C Apply function n times to value. Zeroth element is original value.vectorO(n)l Construct a vector by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. Uunfoldr (\n -> if n == 0 then Nothing else Just (n,n-1)) 10 = <10,9,8,7,6,5,4,3,2,1>vectorO(n)! Construct a vector with at most nb elements by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. -unfoldrN 3 (\n -> Just (n,n-1)) 10 = <10,9,8>vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n) Construct a vector with ng elements by repeatedly applying the generator function to the already constructed part of the vector. DconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in f <a,b,c>vectorO(n) Construct a vector with n{ elements from right to left by repeatedly applying the generator function to the already constructed part of the vector. DconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in f <c,b,a>vectorO(n): Yield a vector of the given length containing the values x, x+15 etc. This operation is usually more efficient than . enumFromN 5 3 = <5,6,7>vectorO(n): Yield a vector of the given length containing the values x, x+y, x+y+y5 etc. This operations is usually more efficient than . +enumFromStepN 1 0.1 5 = <1,1.1,1.2,1.3,1.4>vectorO(n) Enumerate values from x to y.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Enumerate values from x to y with a specific step z.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Prepend an elementvectorO(n) Append an elementvectorO(m+n) Concatenate two vectorsvectorO(n)$ Concatenate all vectors in the listvectorO(n)Y Execute the monadic action the given number of times and store the results in a vector. vectorO(n)U Construct a vector of the given length by applying the monadic action to each index vectorO(n)K Apply monadic function n times to value. Zeroth element is original value. vector;Execute the monadic action and freeze the resulting vector. Fcreate (do { v <- new 2; write v 0 'a'; write v 1 'b'; return v }) = <a,b>  vector<Execute the monadic action and freeze the resulting vectors. vectorO(n)Y Yield the argument but force it not to retain any extra memory, possibly by copying it.@This is especially useful when dealing with slices. For example: force (slice 0 2 <huge vector>)Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected.vectorO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7>vectorO(m+n) For each pair (i,a)O from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value aO from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7> The function A provides the same functionality and is usually more convenient. update_ xs is ys =  xs (2 is ys) vector Same as () but without bounds checking.vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4>vectorO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value bT from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4> The function A provides the same functionality and is usually more convenient. accumulate_ f as is bs =  f as (2 is bs) vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(n) Reverse a vectorvectorO(n)5 Yield the vector obtained by replacing each element i of the index vector by xsi. This is equivalent to  (xs) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>vectorSame as  but without bounds checking.vectorApply a destructive operation to a vector. The operation will be performed in place if it is safe to do so and will modify a copy of the vector otherwise. modify (\v -> write v 0 'x') ( 3 'a') = <'x','a','a'> vectorO(n)- Pair each element in a vector with its indexvectorO(n) Map a function over a vector vectorO(n)< Apply a function to every element of a vector and its index!vector9Map a function over a vector and concatenate the results."vectorO(n)V Apply the monadic action to all elements of the vector, yielding a vector of results#vectorO(n)c Apply the monadic action to every element of a vector and its index, yielding a vector of results$vectorO(n)M Apply the monadic action to all elements of a vector and ignore the results%vectorO(n)[ Apply the monadic action to every element of a vector and its index, ignoring the results&vectorO(n)f Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip ".'vectorO(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip $.(vector O(min(m,n))) Zip two vectors with the given function.)vector*Zip three vectors with the given function.-vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices..vector<Zip three vectors and their indices with the given function.2vector&Elementwise pairing of array elements.3vector3zip together three vectors into a vector of triples7vector O(min(m,n)) Unzip a vector of pairs.<vector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of results=vector O(min(m,n))k Zip the two vectors with a monadic action that also takes the element index and yield a vector of results>vector O(min(m,n))D Zip the two vectors with the monadic action and ignore the results?vector O(min(m,n))d Zip the two vectors with a monadic action that also takes the element index and ignore the results@vectorO(n)0 Drop elements that do not satisfy the predicateAvectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indicesBvectorO(n)! Drop repeated adjacent elements.CvectorO(n)- Drop elements when predicate returns NothingDvectorO(n)J Drop elements when predicate, applied to index and value, returns NothingEvectorO(n)8 Drop elements that do not satisfy the monadic predicateFvectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.GvectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.HvectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The relative order of the elements is preserved at the cost of a sometimes reduced performance compared to I.IvectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The order of the elements is not preserved but the operation is often faster than H.JvectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.KvectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.LvectorO(n)( Check if the vector contains an elementMvectorO(n)= Check if the vector does not contain an element (inverse of L)NvectorO(n) Yield r- the first element matching the predicate or q if no such element exists.OvectorO(n) Yield r; the index of the first element matching the predicate or q if no such element exists.PvectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.QvectorO(n) Yield r; the index of the first occurence of the given element or qO if the vector does not contain the element. This is a specialised version of O.RvectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of P.SvectorO(n) Left foldTvectorO(n) Left fold on non-empty vectorsUvectorO(n)" Left fold with strict accumulatorVvectorO(n)7 Left fold on non-empty vectors with strict accumulatorWvectorO(n) Right foldXvectorO(n) Right fold on non-empty vectorsYvectorO(n)% Right fold with a strict accumulatorZvectorO(n)8 Right fold on non-empty vectors with strict accumulator[vectorO(n); Left fold (function applied to each element and its index)\vectorO(n)T Left fold with strict accumulator (function applied to each element and its index)]vectorO(n)< Right fold (function applied to each element and its index)^vectorO(n)U Right fold with strict accumulator (function applied to each element and its index)_vectorO(n)- Check if all elements satisfy the predicate.`vectorO(n). Check if any element satisfies the predicate.avectorO(n) Check if all elements are ubvectorO(n) Check if any element is ucvectorO(n) Compute the sum of the elementsdvectorO(n)$ Compute the produce of the elementsevectorO(n)G Yield the maximum element of the vector. The vector may not be empty.fvectorO(n)r Yield the maximum element of the vector according to the given comparison function. The vector may not be empty.gvectorO(n)G Yield the minimum element of the vector. The vector may not be empty.hvectorO(n)r Yield the minimum element of the vector according to the given comparison function. The vector may not be empty.ivectorO(n)T Yield the index of the maximum element of the vector. The vector may not be empty.jvectorO(n) Yield the index of the maximum element of the vector according to the given comparison function. The vector may not be empty.kvectorO(n)T Yield the index of the minimum element of the vector. The vector may not be empty.lvectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.mvectorO(n) Monadic foldnvectorO(n)< Monadic fold (action applied to each element and its index)ovectorO(n)$ Monadic fold over non-empty vectorspvectorO(n)% Monadic fold with strict accumulatorqvectorO(n)U Monadic fold with strict accumulator (action applied to each element and its index)rvectorO(n)< Monadic fold over non-empty vectors with strict accumulatorsvectorO(n)& Monadic fold that discards the resulttvectorO(n)V Monadic fold that discards the result (action applied to each element and its index)uvectorO(n)= Monadic fold over non-empty vectors that discards the resultvvectorO(n)> Monadic fold with strict accumulator that discards the resultwvectorO(n)n Monadic fold with strict accumulator that discards the result (action applied to each element and its index)xvectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the resultyvector,Evaluate each action and collect the resultszvector,Evaluate each action and discard the results{vectorO(n) Prescan prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>|vectorO(n) Prescan with strict accumulator}vectorO(n) Scan postscanl f z =  .  f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>~vectorO(n) Scan with strict accumulatorvectorO(n) Haskell-style scan Sscanl f z <x1,...,xn> = <y1,...,y(n+1)> where y1 = z yi = f y(i-1) x(i-1) Example: $scanl (+) 0 <1,2,3,4> = <0,1,3,6,10>vectorO(n)+ Haskell-style scan with strict accumulatorvectorO(n)" Scan over a vector with its indexvectorO(n)- Scan over a vector (strictly) with its indexvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xivectorO(n)7 Scan over a non-empty vector with a strict accumulatorvectorO(n) Right-to-left prescan prescanr f z =  . { (flip f) z .  vectorO(n). Right-to-left prescan with strict accumulatorvectorO(n) Right-to-left scanvectorO(n)+ Right-to-left scan with strict accumulatorvectorO(n)! Right-to-left Haskell-style scanvectorO(n)9 Right-to-left Haskell-style scan with strict accumulatorvectorO(n)0 Right-to-left scan over a vector with its indexvectorO(n); Right-to-left scan over a vector (strictly) with its indexvectorO(n)+ Right-to-left scan over a non-empty vectorvectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorvectorO(n) Convert a vector to a listvectorO(n) Convert a list to a vectorvectorO(n) Convert the first n elements of a list to a vector fromListN n xs =  ( n xs) vectorO(1) Unsafe convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.vectorO(1) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.vectorO(n). Yield a mutable copy of the immutable vector.vectorO(n)/ Yield an immutable copy of the mutable vector.vectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.vectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.vectori starting indexvectorn lengthvectori starting indexvectorn lengthvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectorinitial vector (of length m)vector'vector of index/value pairs (of length n)vectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)vectoraccumulating function fvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vector'vector of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456<=>?789:;@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghklijmnpqorstvwuxyz{|}~5L4M4 (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone2=?@AXvector#Mutable vectors of primitive types.vector-offset, length, underlying mutable byte arrayvectorLength of the mutable vector.vector!Check whether the vector is emptyvector6Yield a part of the mutable vector without copying it.vectorWYield a part of the mutable vector without copying it. No bounds checks are performed.vector"Check whether two vectors overlap.vector,Create a mutable vector of the given length.vectorKCreate a mutable vector of the given length. The memory is not initialized.vectormCreate a mutable vector of the given length (0 if the length is negative) and fill it with an initial value.vectorCreate a mutable vector of the given length (0 if the length is negative) and fill it with values produced by repeatedly executing the monadic action.vector"Create a copy of a mutable vector.vectorLGrow a vector by the given number of elements. The number must be positive.vectordGrow a vector by the given number of elements. The number must be positive but this is not checked.vectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors.vector(Yield the element at the given position.vector*Replace the element at the given position.vector)Modify the element at the given position.vector)Swap the elements at the given positions.vectorHYield the element at the given position. No bounds checks are performed.vectorJReplace the element at the given position. No bounds checks are performed.vectorIModify the element at the given position. No bounds checks are performed.vectorISwap the elements at the given positions. No bounds checks are performed.vector2Set all elements of the vector to the given value.vectorNCopy a vector. The two vectors must have the same length and may not overlap.vectorcCopy a vector. The two vectors must have the same length and may not overlap. This is not checked.vectorJMove the contents of a vector. The two vectors must have the same length.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vectorcMove the contents of a vector. The two vectors must have the same length, but this is not checked.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vector~Compute the next (lexicographically) permutation of given vector in-place. Returns False when input is the last permtuationvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsource)) (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHSVXrvector"Unboxed vectors of primitive typesvector%offset, length, underlying byte arrayvectorO(1) Yield the length of the vectorvectorO(1) Test whether a vector is emptyvector O(1) IndexingvectorO(1) Safe indexingvectorO(1) First elementvectorO(1) Last elementvectorO(1)( Unsafe indexing without bounds checkingvectorO(1)6 First element without checking if the vector is emptyvectorO(1)5 Last element without checking if the vector is emptyvectorO(1) Indexing in a monad.xThe monad allows operations to be strict in the vector when necessary. Suppose vector copying is implemented like this: &copy mv v = ... write mv i (v ! i) ...For lazy vectors, v ! i) would not be evaluated which means that mv, would unnecessarily retain a reference to v in each element written.With /, copying can be implemented like this instead: Scopy mv v = ... do x <- indexM v i write mv i xHere, no references to v$ are retained because indexing (but not% the elements) is evaluated eagerly.vectorO(1)+ First element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)* Last element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)0 Indexing in a monad without bounds checks. See + for an explanation of why this is useful.vectorO(1)C First element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)B Last element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)S Yield a slice of the vector without copying it. The vector must contain at least i+n elements.vectorO(1)N Yield all but the last element without copying. The vector may not be empty.vectorO(1)O Yield all but the first element without copying. The vector may not be empty.vectorO(1) Yield at the first n= elements without copying. The vector may contain less than n1 elements in which case it is returned unchanged.vectorO(1) Yield all but the first n= elements without copying. The vector may contain less than n4 elements in which case an empty vector is returned.vectorO(1) Yield the first n4 elements paired with the remainder without copying. Note that  n v is equivalent to ( n v,  n v) but slightly more efficient.vectorO(1)P Yield a slice of the vector without copying. The vector must contain at least i+n" elements but this is not checked.vectorO(1)f Yield all but the last element without copying. The vector may not be empty but this is not checked.vectorO(1)g Yield all but the first element without copying. The vector may not be empty but this is not checked.vectorO(1) Yield the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Yield all but the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Empty vectorvectorO(1) Vector with exactly one elementvectorO(n)@ Vector of the given length with the same value in each positionvectorO(n)O Construct a vector of the given length by applying the function to each indexvectorO(n)C Apply function n times to value. Zeroth element is original value.vectorO(n)l Construct a vector by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. Uunfoldr (\n -> if n == 0 then Nothing else Just (n,n-1)) 10 = <10,9,8,7,6,5,4,3,2,1>vectorO(n)! Construct a vector with at most nb elements by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. -unfoldrN 3 (\n -> Just (n,n-1)) 10 = <10,9,8>vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n) Construct a vector with ng elements by repeatedly applying the generator function to the already constructed part of the vector. DconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in f <a,b,c>vectorO(n) Construct a vector with n{ elements from right to left by repeatedly applying the generator function to the already constructed part of the vector. DconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in f <c,b,a>vectorO(n): Yield a vector of the given length containing the values x, x+15 etc. This operation is usually more efficient than . enumFromN 5 3 = <5,6,7>vectorO(n): Yield a vector of the given length containing the values x, x+y, x+y+y5 etc. This operations is usually more efficient than . +enumFromStepN 1 0.1 5 = <1,1.1,1.2,1.3,1.4>vectorO(n) Enumerate values from x to y.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Enumerate values from x to y with a specific step z.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Prepend an elementvectorO(n) Append an elementvectorO(m+n) Concatenate two vectorsvectorO(n)$ Concatenate all vectors in the listvectorO(n)Y Execute the monadic action the given number of times and store the results in a vector. vectorO(n)U Construct a vector of the given length by applying the monadic action to each index vectorO(n)K Apply monadic function n times to value. Zeroth element is original value. vector;Execute the monadic action and freeze the resulting vector. Fcreate (do { v <- new 2; write v 0 'a'; write v 1 'b'; return v }) = <a,b>  vector<Execute the monadic action and freeze the resulting vectors. vectorO(n)Y Yield the argument but force it not to retain any extra memory, possibly by copying it.@This is especially useful when dealing with slices. For example: force (slice 0 2 <huge vector>)Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected.vectorO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value aO from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>vector Same as () but without bounds checking.vectorSame as  but without bounds checking.vectorO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value bT from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(n) Reverse a vectorvectorO(n)5 Yield the vector obtained by replacing each element i of the index vector by xsi. This is equivalent to  (xs) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>vectorSame as  but without bounds checking.vectorApply a destructive operation to a vector. The operation will be performed in place if it is safe to do so and will modify a copy of the vector otherwise. modify (\v -> write v 0 'x') ( 3 'a') = <'x','a','a'> vectorO(n) Map a function over a vectorvectorO(n)< Apply a function to every element of a vector and its indexvector9Map a function over a vector and concatenate the results.vectorO(n)V Apply the monadic action to all elements of the vector, yielding a vector of resultsvectorO(n)M Apply the monadic action to all elements of a vector and ignore the resultsvectorO(n)f Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip . vectorO(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip .!vector O(min(m,n))) Zip two vectors with the given function."vector*Zip three vectors with the given function.&vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices.'vector<Zip three vectors and their indices with the given function.+vector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of results,vector O(min(m,n))D Zip the two vectors with the monadic action and ignore the results-vectorO(n)0 Drop elements that do not satisfy the predicate.vectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indices/vectorO(n)! Drop repeated adjacent elements.0vectorO(n)- Drop elements when predicate returns Nothing1vectorO(n)J Drop elements when predicate, applied to index and value, returns Nothing2vectorO(n)8 Drop elements that do not satisfy the monadic predicate3vectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.4vectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.5vectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The relative order of the elements is preserved at the cost of a sometimes reduced performance compared to 6.6vectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The order of the elements is not preserved but the operation is often faster than 5.7vectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.8vectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.9vectorO(n)( Check if the vector contains an element:vectorO(n)= Check if the vector does not contain an element (inverse of 9);vectorO(n) Yield r- the first element matching the predicate or q if no such element exists.<vectorO(n) Yield r; the index of the first element matching the predicate or q if no such element exists.=vectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.>vectorO(n) Yield r; the index of the first occurence of the given element or qO if the vector does not contain the element. This is a specialised version of <.?vectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of =.@vectorO(n) Left foldAvectorO(n) Left fold on non-empty vectorsBvectorO(n)" Left fold with strict accumulatorCvectorO(n)7 Left fold on non-empty vectors with strict accumulatorDvectorO(n) Right foldEvectorO(n) Right fold on non-empty vectorsFvectorO(n)% Right fold with a strict accumulatorGvectorO(n)8 Right fold on non-empty vectors with strict accumulatorHvectorO(n); Left fold (function applied to each element and its index)IvectorO(n)T Left fold with strict accumulator (function applied to each element and its index)JvectorO(n)< Right fold (function applied to each element and its index)KvectorO(n)U Right fold with strict accumulator (function applied to each element and its index)LvectorO(n)- Check if all elements satisfy the predicate.MvectorO(n). Check if any element satisfies the predicate.NvectorO(n) Compute the sum of the elementsOvectorO(n)$ Compute the produce of the elementsPvectorO(n)G Yield the maximum element of the vector. The vector may not be empty.QvectorO(n)r Yield the maximum element of the vector according to the given comparison function. The vector may not be empty.RvectorO(n)G Yield the minimum element of the vector. The vector may not be empty.SvectorO(n)r Yield the minimum element of the vector according to the given comparison function. The vector may not be empty.TvectorO(n)T Yield the index of the maximum element of the vector. The vector may not be empty.UvectorO(n) Yield the index of the maximum element of the vector according to the given comparison function. The vector may not be empty.VvectorO(n)T Yield the index of the minimum element of the vector. The vector may not be empty.WvectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.XvectorO(n) Monadic foldYvectorO(n)$ Monadic fold over non-empty vectorsZvectorO(n)% Monadic fold with strict accumulator[vectorO(n)< Monadic fold over non-empty vectors with strict accumulator\vectorO(n)& Monadic fold that discards the result]vectorO(n)= Monadic fold over non-empty vectors that discards the result^vectorO(n)> Monadic fold with strict accumulator that discards the result_vectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the result`vectorO(n) Prescan prescanl f z =  . d f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>avectorO(n) Prescan with strict accumulatorbvectorO(n) Scan postscanl f z =  . d f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>cvectorO(n) Scan with strict accumulatordvectorO(n) Haskell-style scan Sscanl f z <x1,...,xn> = <y1,...,y(n+1)> where y1 = z yi = f y(i-1) x(i-1) Example: $scanl (+) 0 <1,2,3,4> = <0,1,3,6,10>evectorO(n)+ Haskell-style scan with strict accumulatorfvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xigvectorO(n)7 Scan over a non-empty vector with a strict accumulatorhvectorO(n) Right-to-left prescan prescanr f z =  . ` (flip f) z .  ivectorO(n). Right-to-left prescan with strict accumulatorjvectorO(n) Right-to-left scankvectorO(n)+ Right-to-left scan with strict accumulatorlvectorO(n)! Right-to-left Haskell-style scanmvectorO(n)9 Right-to-left Haskell-style scan with strict accumulatornvectorO(n)+ Right-to-left scan over a non-empty vectorovectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorpvectorO(n) Convert a vector to a listqvectorO(n) Convert a list to a vectorrvectorO(n) Convert the first n elements of a list to a vector fromListN n xs = q ( n xs) svectorO(1) Unsafe convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.tvectorO(1) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.uvectorO(n). Yield a mutable copy of the immutable vector.vvectorO(n)/ Yield an immutable copy of the mutable vector.wvectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.xvectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.vectori starting indexvectorn lengthvectori starting indexvectorn lengthvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)vectoraccumulating function fvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSVWTUXZY[\^]_`abcdefghijklmnopqrvuxstw594:4 (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AFXΠ!vectorMutable -based vectorsvectorLength of the mutable vector.vector!Check whether the vector is emptyvector6Yield a part of the mutable vector without copying it.vectorWYield a part of the mutable vector without copying it. No bounds checks are performed.vector"Check whether two vectors overlap.vector,Create a mutable vector of the given length.vectorKCreate a mutable vector of the given length. The memory is not initialized.vectormCreate a mutable vector of the given length (0 if the length is negative) and fill it with an initial value.vectorCreate a mutable vector of the given length (0 if the length is negative) and fill it with values produced by repeatedly executing the monadic action.vector"Create a copy of a mutable vector.vectorLGrow a vector by the given number of elements. The number must be positive.vectordGrow a vector by the given number of elements. The number must be positive but this is not checked.vectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors.vector(Yield the element at the given position.vector*Replace the element at the given position.vector)Modify the element at the given position.vector)Swap the elements at the given positions.vectorHYield the element at the given position. No bounds checks are performed.vectorJReplace the element at the given position. No bounds checks are performed.vectorIModify the element at the given position. No bounds checks are performed.vectorISwap the elements at the given positions. No bounds checks are performed.vector2Set all elements of the vector to the given value.vectorNCopy a vector. The two vectors must have the same length and may not overlap.vectorcCopy a vector. The two vectors must have the same length and may not overlap. This is not checked.vectorJMove the contents of a vector. The two vectors must have the same length.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vectorcMove the contents of a vector. The two vectors must have the same length, but this is not checked.:If the vectors do not overlap, then this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.vectorO(1) Unsafely cast a mutable vector from one element type to another. The operation just changes the type of the underlying pointer and does not modify the elements.\The resulting vector contains as many elements as can fit into the underlying memory block.vectorCreate a mutable vector from a z with an offset and a length.Modifying data through the zT afterwards is unsafe if the vector could have been frozen before the modification.0If your offset is 0 it is more efficient to use .vectorO(1) Create a mutable vector from a z and a length.HIt is assumed the pointer points directly to the data (no offset). Use " if you need to specify an offset.Modifying data through the zT afterwards is unsafe if the vector could have been frozen before the modification.vectorYield the underlying zV together with the offset to the data and its length. Modifying the data through the zD is unsafe if the vector could have frozen before the modification.vectorO(1) Yield the underlying z together with its length.CYou can assume the pointer points directly to the data (no offset).Modifying the data through the zD is unsafe if the vector could have frozen before the modification.vectorPass a pointer to the vector's data to the IO action. Modifying data through the pointer is unsafe if the vector could have been frozen before the modification.vectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourcevectorpointervectoroffsetvectorlengthvectorpointervectorlength.. (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHSVXvector-based vectorsvectorO(1) Yield the length of the vectorvectorO(1) Test whether a vector is emptyvector O(1) IndexingvectorO(1) Safe indexingvectorO(1) First elementvectorO(1) Last elementvectorO(1)( Unsafe indexing without bounds checkingvectorO(1)6 First element without checking if the vector is emptyvectorO(1)5 Last element without checking if the vector is emptyvectorO(1) Indexing in a monad.xThe monad allows operations to be strict in the vector when necessary. Suppose vector copying is implemented like this: &copy mv v = ... write mv i (v ! i) ...For lazy vectors, v ! i) would not be evaluated which means that mv, would unnecessarily retain a reference to v in each element written.With /, copying can be implemented like this instead: Scopy mv v = ... do x <- indexM v i write mv i xHere, no references to v$ are retained because indexing (but not% the elements) is evaluated eagerly.vectorO(1)+ First element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)* Last element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)0 Indexing in a monad without bounds checks. See + for an explanation of why this is useful.vectorO(1)C First element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)B Last element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)S Yield a slice of the vector without copying it. The vector must contain at least i+n elements.vectorO(1)N Yield all but the last element without copying. The vector may not be empty.vectorO(1)O Yield all but the first element without copying. The vector may not be empty.vectorO(1) Yield at the first n= elements without copying. The vector may contain less than n1 elements in which case it is returned unchanged.vectorO(1) Yield all but the first n= elements without copying. The vector may contain less than n4 elements in which case an empty vector is returned.vectorO(1) Yield the first n4 elements paired with the remainder without copying. Note that  n v is equivalent to ( n v,  n v) but slightly more efficient.vectorO(1)P Yield a slice of the vector without copying. The vector must contain at least i+n" elements but this is not checked.vectorO(1)f Yield all but the last element without copying. The vector may not be empty but this is not checked.vectorO(1)g Yield all but the first element without copying. The vector may not be empty but this is not checked.vectorO(1) Yield the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Yield all but the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Empty vectorvectorO(1) Vector with exactly one elementvectorO(n)@ Vector of the given length with the same value in each positionvectorO(n)O Construct a vector of the given length by applying the function to each indexvectorO(n)C Apply function n times to value. Zeroth element is original value.vectorO(n)l Construct a vector by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. Uunfoldr (\n -> if n == 0 then Nothing else Just (n,n-1)) 10 = <10,9,8,7,6,5,4,3,2,1>vectorO(n)! Construct a vector with at most nb elements by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. -unfoldrN 3 (\n -> Just (n,n-1)) 10 = <10,9,8>vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n) Construct a vector with ng elements by repeatedly applying the generator function to the already constructed part of the vector. DconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in f <a,b,c>vectorO(n) Construct a vector with n{ elements from right to left by repeatedly applying the generator function to the already constructed part of the vector. DconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in f <c,b,a>vectorO(n): Yield a vector of the given length containing the values x, x+15 etc. This operation is usually more efficient than . enumFromN 5 3 = <5,6,7>vectorO(n): Yield a vector of the given length containing the values x, x+y, x+y+y5 etc. This operations is usually more efficient than . +enumFromStepN 1 0.1 5 = <1,1.1,1.2,1.3,1.4>vectorO(n) Enumerate values from x to y.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Enumerate values from x to y with a specific step z.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Prepend an elementvectorO(n) Append an elementvectorO(m+n) Concatenate two vectorsvectorO(n)$ Concatenate all vectors in the listvectorO(n)Y Execute the monadic action the given number of times and store the results in a vector.vectorO(n)U Construct a vector of the given length by applying the monadic action to each indexvectorO(n)K Apply monadic function n times to value. Zeroth element is original value.vector;Execute the monadic action and freeze the resulting vector. Fcreate (do { v <- new 2; write v 0 'a'; write v 1 'b'; return v }) = <a,b> vector<Execute the monadic action and freeze the resulting vectors.vectorO(n)Y Yield the argument but force it not to retain any extra memory, possibly by copying it.@This is especially useful when dealing with slices. For example: force (slice 0 2 <huge vector>)Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected.vectorO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value aO from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>vector Same as () but without bounds checking.vectorSame as  but without bounds checking.vectorO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value bT from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(n) Reverse a vectorvectorO(n)5 Yield the vector obtained by replacing each element i of the index vector by xsi. This is equivalent to  (xs) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>vectorSame as  but without bounds checking.vectorApply a destructive operation to a vector. The operation will be performed in place if it is safe to do so and will modify a copy of the vector otherwise. modify (\v -> write v 0 'x') ( 3 'a') = <'x','a','a'> vectorO(n) Map a function over a vectorvectorO(n)< Apply a function to every element of a vector and its indexvector9Map a function over a vector and concatenate the results.vectorO(n)V Apply the monadic action to all elements of the vector, yielding a vector of resultsvectorO(n)M Apply the monadic action to all elements of a vector and ignore the resultsvectorO(n)f Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip .vectorO(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip .vector O(min(m,n))) Zip two vectors with the given function.vector*Zip three vectors with the given function.vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices.vector<Zip three vectors and their indices with the given function.vector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of resultsvector O(min(m,n))D Zip the two vectors with the monadic action and ignore the resultsvectorO(n)0 Drop elements that do not satisfy the predicate vectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indices vectorO(n)! Drop repeated adjacent elements. vectorO(n)- Drop elements when predicate returns Nothing vectorO(n)J Drop elements when predicate, applied to index and value, returns Nothing vectorO(n)8 Drop elements that do not satisfy the monadic predicatevectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.vectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.vectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The relative order of the elements is preserved at the cost of a sometimes reduced performance compared to .vectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The order of the elements is not preserved but the operation is often faster than .vectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.vectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.vectorO(n)( Check if the vector contains an elementvectorO(n)= Check if the vector does not contain an element (inverse of )vectorO(n) Yield r- the first element matching the predicate or q if no such element exists.vectorO(n) Yield r; the index of the first element matching the predicate or q if no such element exists.vectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.vectorO(n) Yield r; the index of the first occurence of the given element or qO if the vector does not contain the element. This is a specialised version of .vectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of .vectorO(n) Left foldvectorO(n) Left fold on non-empty vectorsvectorO(n)" Left fold with strict accumulatorvectorO(n)7 Left fold on non-empty vectors with strict accumulatorvectorO(n) Right fold vectorO(n) Right fold on non-empty vectors!vectorO(n)% Right fold with a strict accumulator"vectorO(n)8 Right fold on non-empty vectors with strict accumulator#vectorO(n); Left fold (function applied to each element and its index)$vectorO(n)T Left fold with strict accumulator (function applied to each element and its index)%vectorO(n)< Right fold (function applied to each element and its index)&vectorO(n)U Right fold with strict accumulator (function applied to each element and its index)'vectorO(n)- Check if all elements satisfy the predicate.(vectorO(n). Check if any element satisfies the predicate.)vectorO(n) Check if all elements are u*vectorO(n) Check if any element is u+vectorO(n) Compute the sum of the elements,vectorO(n)$ Compute the produce of the elements-vectorO(n)G Yield the maximum element of the vector. The vector may not be empty..vectorO(n)r Yield the maximum element of the vector according to the given comparison function. The vector may not be empty./vectorO(n)G Yield the minimum element of the vector. The vector may not be empty.0vectorO(n)r Yield the minimum element of the vector according to the given comparison function. The vector may not be empty.1vectorO(n)T Yield the index of the maximum element of the vector. The vector may not be empty.2vectorO(n) Yield the index of the maximum element of the vector according to the given comparison function. The vector may not be empty.3vectorO(n)T Yield the index of the minimum element of the vector. The vector may not be empty.4vectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.5vectorO(n) Monadic fold6vectorO(n)$ Monadic fold over non-empty vectors7vectorO(n)% Monadic fold with strict accumulator8vectorO(n)< Monadic fold over non-empty vectors with strict accumulator9vectorO(n)& Monadic fold that discards the result:vectorO(n)= Monadic fold over non-empty vectors that discards the result;vectorO(n)> Monadic fold with strict accumulator that discards the result<vectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the result=vectorO(n) Prescan prescanl f z =  . A f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>>vectorO(n) Prescan with strict accumulator?vectorO(n) Scan postscanl f z =  . A f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>@vectorO(n) Scan with strict accumulatorAvectorO(n) Haskell-style scan Sscanl f z <x1,...,xn> = <y1,...,y(n+1)> where y1 = z yi = f y(i-1) x(i-1) Example: $scanl (+) 0 <1,2,3,4> = <0,1,3,6,10>BvectorO(n)+ Haskell-style scan with strict accumulatorCvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xiDvectorO(n)7 Scan over a non-empty vector with a strict accumulatorEvectorO(n) Right-to-left prescan prescanr f z =  . = (flip f) z .  FvectorO(n). Right-to-left prescan with strict accumulatorGvectorO(n) Right-to-left scanHvectorO(n)+ Right-to-left scan with strict accumulatorIvectorO(n)! Right-to-left Haskell-style scanJvectorO(n)9 Right-to-left Haskell-style scan with strict accumulatorKvectorO(n)+ Right-to-left scan over a non-empty vectorLvectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorMvectorO(n) Convert a vector to a listNvectorO(n) Convert a list to a vectorOvectorO(n) Convert the first n elements of a list to a vector fromListN n xs = N ( n xs) PvectorO(1) Unsafely cast a vector from one element type to another. The operation just changes the type of the underlying pointer and does not modify the elements.\The resulting vector contains as many elements as can fit into the underlying memory block.QvectorO(1) Unsafe convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.RvectorO(1) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.SvectorO(n). Yield a mutable copy of the immutable vector.TvectorO(n)/ Yield an immutable copy of the mutable vector.UvectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.VvectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.WvectorO(1) Create a vector from a z with an offset and a length.)The data may not be modified through the z afterwards.0If your offset is 0 it is more efficient to use X.XvectorO(1) Create a vector from a z and a length.HIt is assumed the pointer points directly to the data (no offset). Use W" if you need to specify an offset.)The data may not be modified through the z afterwards.YvectorO(1) Yield the underlying z` together with the offset to the data and its length. The data may not be modified through the z.ZvectorO(1) Yield the underlying z together with its length.CYou can assume the pointer points directly to the data (no offset).)The data may not be modified through the z.[vectorePass a pointer to the vector's data to the IO action. The data may not be modified through the 'Ptr.vectori starting indexvectorn lengthvectori starting indexvectorn lengthvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)vectoraccumulating function fvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)WvectorpointervectoroffsetvectorlengthXvectorpointervectorlength      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[      !"#$%&'()*+,-./0341257689;:<=>?@ABCDEFGHIJKLMNOPTSVQRUWXYZ[544 (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 12>@AHV/fghi{|}~j~}|{zyxwvutsrqponmlk (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNoneHSVX vectorO(1) Yield the length of the vectorvectorO(1) Test whether a vector is emptyvector O(1) IndexingvectorO(1) Safe indexingvectorO(1) First elementvectorO(1) Last elementvectorO(1)( Unsafe indexing without bounds checkingvectorO(1)6 First element without checking if the vector is emptyvectorO(1)5 Last element without checking if the vector is emptyvectorO(1) Indexing in a monad.xThe monad allows operations to be strict in the vector when necessary. Suppose vector copying is implemented like this: &copy mv v = ... write mv i (v ! i) ...For lazy vectors, v ! i) would not be evaluated which means that mv, would unnecessarily retain a reference to v in each element written.With /, copying can be implemented like this instead: Scopy mv v = ... do x <- indexM v i write mv i xHere, no references to v$ are retained because indexing (but not% the elements) is evaluated eagerly.vectorO(1)+ First element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)* Last element of a vector in a monad. See + for an explanation of why this is useful.vectorO(1)0 Indexing in a monad without bounds checks. See + for an explanation of why this is useful.vectorO(1)C First element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)B Last element in a monad without checking for empty vectors. See * for an explanation of why this is useful.vectorO(1)S Yield a slice of the vector without copying it. The vector must contain at least i+n elements.vectorO(1)N Yield all but the last element without copying. The vector may not be empty.vectorO(1)O Yield all but the first element without copying. The vector may not be empty.vectorO(1) Yield at the first n= elements without copying. The vector may contain less than n1 elements in which case it is returned unchanged.vectorO(1) Yield all but the first n= elements without copying. The vector may contain less than n4 elements in which case an empty vector is returned.vectorO(1) Yield the first n4 elements paired with the remainder without copying. Note that  n v is equivalent to ( n v,  n v) but slightly more efficient.vectorO(1)P Yield a slice of the vector without copying. The vector must contain at least i+n" elements but this is not checked.vectorO(1)f Yield all but the last element without copying. The vector may not be empty but this is not checked.vectorO(1)g Yield all but the first element without copying. The vector may not be empty but this is not checked.vectorO(1) Yield the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Yield all but the first n= elements without copying. The vector must contain at least n" elements but this is not checked.vectorO(1) Empty vectorvectorO(1) Vector with exactly one elementvectorO(n)@ Vector of the given length with the same value in each positionvectorO(n)O Construct a vector of the given length by applying the function to each indexvectorO(n)C Apply function n times to value. Zeroth element is original value.vectorO(n)l Construct a vector by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. Uunfoldr (\n -> if n == 0 then Nothing else Just (n,n-1)) 10 = <10,9,8,7,6,5,4,3,2,1>vectorO(n)! Construct a vector with at most nb elements by repeatedly applying the generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements. -unfoldrN 3 (\n -> Just (n,n-1)) 10 = <10,9,8>vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n)t Construct a vector by repeatedly applying the monadic generator function to a seed. The generator function yields r' the next element and the new seed or q if there are no more elements.vectorO(n) Construct a vector with ng elements by repeatedly applying the generator function to the already constructed part of the vector. DconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in f <a,b,c>vectorO(n) Construct a vector with n{ elements from right to left by repeatedly applying the generator function to the already constructed part of the vector. DconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in f <c,b,a>vectorO(n): Yield a vector of the given length containing the values x, x+15 etc. This operation is usually more efficient than . enumFromN 5 3 = <5,6,7>vectorO(n): Yield a vector of the given length containing the values x, x+y, x+y+y5 etc. This operations is usually more efficient than . +enumFromStepN 1 0.1 5 = <1,1.1,1.2,1.3,1.4>vectorO(n) Enumerate values from x to y.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Enumerate values from x to y with a specific step z.WARNING:B This operation can be very inefficient. If at all possible, use  instead.vectorO(n) Prepend an elementvectorO(n) Append an elementvectorO(m+n) Concatenate two vectorsvectorO(n)$ Concatenate all vectors in the listvectorO(n)Y Execute the monadic action the given number of times and store the results in a vector.vectorO(n)U Construct a vector of the given length by applying the monadic action to each indexvectorO(n)K Apply monadic function n times to value. Zeroth element is original value.vector;Execute the monadic action and freeze the resulting vector. Fcreate (do { v <- new 2; write v 0 'a'; write v 1 'b'; return v }) = <a,b> vector<Execute the monadic action and freeze the resulting vectors.vectorO(n)Y Yield the argument but force it not to retain any extra memory, possibly by copying it.@This is especially useful when dealing with slices. For example: force (slice 0 2 <huge vector>)Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected.vectorO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7>vectorO(m+n) For each pair (i,a)O from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value aO from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7> The function A provides the same functionality and is usually more convenient. update_ xs is ys =  xs (- is ys) vector Same as () but without bounds checking.vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4>vectorO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>vectorO(m+min(n1,n2)) For each index i4 from the index vector and the corresponding value bT from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4> The function A provides the same functionality and is usually more convenient. accumulate_ f as is bs =  f as (- is bs) vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorSame as  but without bounds checking.vectorO(n) Reverse a vectorvectorO(n)5 Yield the vector obtained by replacing each element i of the index vector by xsi. This is equivalent to  (xs) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>vectorSame as  but without bounds checking.vectorApply a destructive operation to a vector. The operation will be performed in place if it is safe to do so and will modify a copy of the vector otherwise. modify (\v -> write v 0 'x') ( 3 'a') = <'x','a','a'> vectorO(n)- Pair each element in a vector with its indexvectorO(n) Map a function over a vectorvectorO(n)< Apply a function to every element of a vector and its indexvector9Map a function over a vector and concatenate the results.vectorO(n)V Apply the monadic action to all elements of the vector, yielding a vector of resultsvectorO(n)c Apply the monadic action to every element of a vector and its index, yielding a vector of resultsvectorO(n)M Apply the monadic action to all elements of a vector and ignore the resultsvectorO(n)[ Apply the monadic action to every element of a vector and its index, ignoring the resultsvectorO(n)f Apply the monadic action to all elements of the vector, yielding a vector of results. Equivalent to flip .vectorO(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip .vector O(min(m,n))) Zip two vectors with the given function.vector*Zip three vectors with the given function.vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices.vector<Zip three vectors and their indices with the given function.vector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of resultsvector O(min(m,n))k Zip the two vectors with a monadic action that also takes the element index and yield a vector of resultsvector O(min(m,n))D Zip the two vectors with the monadic action and ignore the resultsvector O(min(m,n))d Zip the two vectors with a monadic action that also takes the element index and ignore the resultsvectorO(n)0 Drop elements that do not satisfy the predicatevectorO(n)! Drop repeated adjacent elements.vectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indicesvectorO(n)- Drop elements when predicate returns NothingvectorO(n)J Drop elements when predicate, applied to index and value, returns NothingvectorO(n)8 Drop elements that do not satisfy the monadic predicatevectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.vectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.vectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The relative order of the elements is preserved at the cost of a sometimes reduced performance compared to .vectorO(n) Split the vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The order of the elements is not preserved but the operation is often faster than .vectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.vectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.vectorO(n)( Check if the vector contains an elementvectorO(n)= Check if the vector does not contain an element (inverse of )vectorO(n) Yield r- the first element matching the predicate or q if no such element exists.vectorO(n) Yield r; the index of the first element matching the predicate or q if no such element exists.vectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.vectorO(n) Yield r; the index of the first occurence of the given element or qO if the vector does not contain the element. This is a specialised version of .vectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of .vectorO(n) Left foldvectorO(n) Left fold on non-empty vectorsvectorO(n)" Left fold with strict accumulatorvectorO(n)7 Left fold on non-empty vectors with strict accumulatorvectorO(n) Right foldvectorO(n) Right fold on non-empty vectorsvectorO(n)% Right fold with a strict accumulatorvectorO(n)8 Right fold on non-empty vectors with strict accumulatorvectorO(n); Left fold (function applied to each element and its index)vectorO(n)T Left fold with strict accumulator (function applied to each element and its index)vectorO(n)< Right fold (function applied to each element and its index)vectorO(n)U Right fold with strict accumulator (function applied to each element and its index)vectorO(n)- Check if all elements satisfy the predicate.vectorO(n). Check if any element satisfies the predicate.vectorO(n) Check if all elements are uvectorO(n) Check if any element is uvectorO(n) Compute the sum of the elementsvectorO(n)$ Compute the produce of the elementsvectorO(n)G Yield the maximum element of the vector. The vector may not be empty.vectorO(n)r Yield the maximum element of the vector according to the given comparison function. The vector may not be empty.vectorO(n)G Yield the minimum element of the vector. The vector may not be empty.vectorO(n)r Yield the minimum element of the vector according to the given comparison function. The vector may not be empty.vectorO(n)T Yield the index of the maximum element of the vector. The vector may not be empty.vectorO(n) Yield the index of the maximum element of the vector according to the given comparison function. The vector may not be empty.vectorO(n)T Yield the index of the minimum element of the vector. The vector may not be empty.vectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.vectorO(n) Monadic fold vectorO(n)< Monadic fold (action applied to each element and its index) vectorO(n)$ Monadic fold over non-empty vectors vectorO(n)% Monadic fold with strict accumulator vectorO(n)U Monadic fold with strict accumulator (action applied to each element and its index) vectorO(n)< Monadic fold over non-empty vectors with strict accumulatorvectorO(n)& Monadic fold that discards the resultvectorO(n)V Monadic fold that discards the result (action applied to each element and its index)vectorO(n)= Monadic fold over non-empty vectors that discards the resultvectorO(n)> Monadic fold with strict accumulator that discards the resultvectorO(n)n Monadic fold with strict accumulator that discards the result (action applied to each element and its index)vectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the resultvectorO(n) Prescan prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>vectorO(n) Prescan with strict accumulatorvectorO(n) Scan postscanl f z =  .  f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>vectorO(n) Scan with strict accumulatorvectorO(n) Haskell-style scan Sscanl f z <x1,...,xn> = <y1,...,y(n+1)> where y1 = z yi = f y(i-1) x(i-1) Example: $scanl (+) 0 <1,2,3,4> = <0,1,3,6,10>vectorO(n)+ Haskell-style scan with strict accumulatorvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xivectorO(n)7 Scan over a non-empty vector with a strict accumulatorvectorO(n) Right-to-left prescan prescanr f z =  .  (flip f) z .  vectorO(n). Right-to-left prescan with strict accumulatorvectorO(n) Right-to-left scanvectorO(n)+ Right-to-left scan with strict accumulator vectorO(n)! Right-to-left Haskell-style scan!vectorO(n)9 Right-to-left Haskell-style scan with strict accumulator"vectorO(n)+ Right-to-left scan over a non-empty vector#vectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulator$vectorO(n) Convert a vector to a list%vectorO(n) Convert a list to a vector&vectorO(n) Convert the first n elements of a list to a vector fromListN n xs = % ( n xs) 'vectorO(1) Unsafe convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.(vectorO(1) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.)vectorO(n). Yield a mutable copy of the immutable vector.*vectorO(n)/ Yield an immutable copy of the mutable vector.+vectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.,vectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.-vectorO(1) Zip 2 vectors.vectorO(1) Unzip 2 vectors/vectorO(1) Zip 3 vectors0vectorO(1) Unzip 3 vectors1vectorO(1) Zip 4 vectors2vectorO(1) Unzip 4 vectors3vectorO(1) Zip 5 vectors4vectorO(1) Unzip 5 vectors5vectorO(1) Zip 6 vectors6vectorO(1) Unzip 6 vectorsvectori starting indexvectorn lengthvectori starting indexvectorn lengthvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectorinitial vector (of length m)vector'vector of index/value pairs (of length n)vectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)vectoraccumulating function fvectorinitial vector (of length m)vector%list of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vector'vector of index/value pairs (of length n)vectoraccumulating function fvectorinitial vector (of length m)vectorindex vector (of length n1)vectorvalue vector (of length n2)fij~}|{zyxwvutsrqponmlk      !"#$%&'()*+,-./0123456ij~}|{zyxwvutsrqponmlkf-/135.0246      !"#$%&*),'(+544 (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone=%>vectorLength of the mutable vector.?vector!Check whether the vector is empty@vector6Yield a part of the mutable vector without copying it.FvectorWYield a part of the mutable vector without copying it. No bounds checks are performed.Kvector"Check whether two vectors overlap.Lvector,Create a mutable vector of the given length.MvectorKCreate a mutable vector of the given length. The memory is not initialized.NvectormCreate a mutable vector of the given length (0 if the length is negative) and fill it with an initial value.OvectorCreate a mutable vector of the given length (0 if the length is negative) and fill it with values produced by repeatedly executing the monadic action.Pvector"Create a copy of a mutable vector.QvectorLGrow a vector by the given number of elements. The number must be positive.RvectordGrow a vector by the given number of elements. The number must be positive but this is not checked.SvectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors.Tvector(Yield the element at the given position.Uvector*Replace the element at the given position.Vvector)Modify the element at the given position.Wvector)Swap the elements at the given positions.XvectorHYield the element at the given position. No bounds checks are performed.YvectorJReplace the element at the given position. No bounds checks are performed.ZvectorIModify the element at the given position. No bounds checks are performed.[vectorISwap the elements at the given positions. No bounds checks are performed.\vector2Set all elements of the vector to the given value.]vectorNCopy a vector. The two vectors must have the same length and may not overlap.^vectorcCopy a vector. The two vectors must have the same length and may not overlap. This is not checked._vectorJMove the contents of a vector. The two vectors must have the same length.:If the vectors do not overlap, then this is equivalent to ]. Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.`vectorcMove the contents of a vector. The two vectors must have the same length, but this is not checked.:If the vectors do not overlap, then this is equivalent to ^. Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.avector~Compute the next (lexicographically) permutation of given vector in-place. Returns False when input is the last permtuationbvectorO(1) Zip 2 vectorscvectorO(1) Unzip 2 vectorsdvectorO(1) Zip 3 vectorsevectorO(1) Unzip 3 vectorsfvectorO(1) Zip 4 vectorsgvectorO(1) Unzip 4 vectorshvectorO(1) Zip 5 vectorsivectorO(1) Unzip 5 vectorsjvectorO(1) Zip 6 vectorskvectorO(1) Unzip 6 vectorsFvectorstarting indexvectorlength of the slice]vectortargetvectorsource^vectortargetvectorsource`vectortargetvectorsourceGfghj~}|{zyxwvutsrqponmlk>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkGj~}|{zyxwvutsrqponmlkhgf>?@DEABCFIJGHKLMNOPQRSbdfhjcegikTUVWXYZ[a\]_^` !"#$%&&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO@APJQRSTUVWXYZ[\]^__`abcdefghijklmnopqrstuvwxyz{|}~     d e f g h i j k l m n o p q r s t u v w x y z { | } ~    d e f g h j l m n o p q r s t u v w x | } ~ y z  d e s v w t u h i                                   ! "  # s t u v w de$rop%&'()*+,-stuvwfghj./0lmn12ik3456789:;<=>}x?y@zABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   ? ? d e s v w t u h i                   Mde$rop%&'()*+,-stuvwfghj./0lmn1ik3456789:;<=>}x?y@zABCDEFGHKLMNOIJPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~??desvwtuhi    MMde$rop%&'()*+,-stuvwfghj./0lmn1ik345678:<=>x?yzBCDEFGHPQRSTUVWXYZ[\]^_`abcdefghilnoqvwxyz{~??desvwtuhi    Mde$rop%&'()*+,-stuvwfghj./0lmn1ik345678:<=>x?yzBCDEFGHPQRSTUVWXYZ[\]^_`abcdefghilnoqvwxyz{~M?de$rop%&'()*+,-stuvwfghj./0lmn1ik3456789:;<=>}x?y@zABCDEFGHIJPQRSTUVWXYZ[\]^_`abcdefghijklmnopqvwxyz{~KLMNOdesvwtuhi    KLMNO d h      &vector-0.12.0.3-9DBmbAxwjsI3C7OopRSK19!Data.Vector.Fusion.Stream.MonadicData.Vector.Storable.MutableData.Vector.Primitive.MutableData.Vector.Fusion.UtilData.Vector.Fusion.Bundle.Size Data.Vector.Generic.Mutable.BaseData.Vector.GenericData.Vector.Internal.Check!Data.Vector.Fusion.Bundle.MonadicData.Vector.Fusion.BundleData.Vector.Generic.MutableData.Vector.Generic.NewData.Vector.Mutable Data.VectorData.Vector.PrimitiveData.Vector.Storable.InternalData.Vector.StorableData.Vector.UnboxedData.Vector.Unboxed.MutableData.Vector.Generic.BasePrelude showsPrec Text.ReadreadPrec Data.DatagfoldlData.Vector.Unboxed.Baseghc-prim GHC.TypesSPECSPEC2baseForeign.StorableStorable(primitive-0.6.4.0-1mvPxVOk6Q6KOkWCZxqESfData.Primitive.TypesPrimBoxunBoxIdunId delay_inline delayed_min $fMonadId$fApplicativeId $fFunctorId $fMonadBox$fApplicativeBox $fFunctorBoxSizeExactMaxUnknownclampedSubtractsmallerlargertoMax lowerBound upperBound $fNumSize$fEqSize $fShowSizeMVector basicLengthbasicUnsafeSlice basicOverlapsbasicUnsafeNewbasicInitializebasicUnsafeReplicatebasicUnsafeReadbasicUnsafeWrite basicClearbasicSetbasicUnsafeCopybasicUnsafeMovebasicUnsafeGrowVectorbasicUnsafeFreezebasicUnsafeThawbasicUnsafeIndexMelemseqMutableChecksBoundsUnsafeInternaldoCheckserror internalErrorcheck checkIndex checkLength checkSlice $fEqChecksStreamStepYieldSkipDonelengthnullempty singleton replicate replicateMgenerate generateMconssnoc++headlast!!!?sliceinittailtakedropmapmapMmapM_transunboxindexedindexedRzipWithM zipWithM_ zipWith3M zipWith4M zipWith5M zipWith6MzipWithzipWith3zipWith4zipWith5zipWith6zipzip3zip4zip5zip6eqBycmpByfiltermapMaybefilterMuniq takeWhile takeWhileM dropWhile dropWhileMelemnotElemfindfindM findIndex findIndexMfoldlfoldlMfoldMfoldl1foldl1Mfold1Mfoldl'foldlM'foldM'foldl1'foldl1M'fold1M'foldrfoldrMfoldr1foldr1Mandor concatMap concatMapMflattenunfoldrunfoldrMunfoldrN unfoldrNM iterateNMiterateNprescanl prescanlM prescanl' prescanlM' postscanl postscanlM postscanl' postscanlM'scanlscanlMscanl'scanlM'scanl1scanl1Mscanl1'scanl1M' enumFromStepN enumFromToenumFromThenTotoListfromList fromListN $fFunctorStep$fFunctorStreamBundlesElemssChunkssVectorsSizeChunk fromStreamchunkselementssizesizedunsafeFromList fromVector fromVectors concatVectorsreVector$fFunctorBundleMBundleinplacelifteqcmp $fOrd1Bundle $fEq1Bundle $fOrdBundle $fEqBundlemstreamfill transformmstreamRfillR transformRunstream munstream vunstream unstreamR munstreamRsplitAt unsafeSlice unsafeInit unsafeTail unsafeTake unsafeDropoverlapsnew unsafeNewclonegrow growFront unsafeGrowunsafeGrowFrontclearreadwritemodifyswapexchange unsafeRead unsafeWrite unsafeModify unsafeSwapunsafeExchangesetcopymove unsafeCopy unsafeMoveaccumupdate unsafeAccum unsafeUpdatereverseunstablePartitionunstablePartitionBundlepartitionBundlenextPermutationNewcreaterunrunPrimapplymodifyWithBundle! unsafeIndex unsafeHead unsafeLastindexMheadMlastM unsafeIndexM unsafeHeadM unsafeLastM constructN constructrN enumFromNconcatconcatNEcreateTforce//update_ unsafeUpd unsafeUpdate_ accumulate accumulate_unsafeAccumulateunsafeAccumulate_ backpermuteunsafeBackpermuteimapimapMimapM_forMforM_izipWith izipWith3 izipWith4 izipWith5 izipWith6 izipWithM izipWithM_unzipunzip3unzip4unzip5unzip6ifilter imapMaybe partitionspanbreak findIndices elemIndex elemIndicesfoldr'foldr1'ifoldlifoldl'ifoldrifoldr'allanysumproductmaximum maximumByminimum minimumBymaxIndex maxIndexByminIndex minIndexByifoldMifoldM'foldM_ifoldM_fold1M_foldM'_ifoldM'_fold1M'_sequence sequence_iscanliscanl'prescanr prescanr' postscanr postscanr'scanrscanr'iscanriscanr'scanr1scanr1'convert unsafeFreezefreeze unsafeThawthawstreamstreamR liftShowsPrec liftReadsPrecmkTypedataCastSTVectorIOVector$fMVectorMVectora$fTraversableVector$fFoldableVector$fAlternativeVector$fApplicativeVector$fMonadZipVector$fMonadPlusVector$fMonadFailVector $fMonadVector$fFunctorVector$fMonoidVector$fSemigroupVector $fOrd1Vector $fEq1Vector $fOrdVector $fEqVector$fVectorVectora $fDataVector$fIsListVector $fRead1Vector $fShow1Vector $fReadVector $fShowVector$fNFDataVector$fNFDataMVectorgetPtrsetPtrupdPtr unsafeCastunsafeFromForeignPtrunsafeFromForeignPtr0unsafeToForeignPtrunsafeToForeignPtr0 unsafeWithUnboxMV_6MV_5MV_4MV_3MV_2 MV_ComplexMV_BoolMV_Char MV_DoubleMV_Float MV_Word64 MV_Word32 MV_Word16MV_Word8MV_WordMV_Int64MV_Int32MV_Int16MV_Int8MV_IntMV_Unit GHC.Classesmin Data.FoldableGHC.List&&|| GHC.MaybeNothingJust vmunstreamenlargeTrueEqOrdText.ParserCombinators.ReadPReadSIOGHC.ForeignPtr ForeignPtrV_UnitV_IntV_Int8V_Int16V_Int32V_Int64V_WordV_Word8V_Word16V_Word32V_Word64V_FloatV_DoubleV_CharV_Bool V_ComplexV_2V_3V_4V_5V_6