!\R      !"#$%&'()*+,-./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[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimentalportableSafeY,vector Box monadvectorIdentity monad vectorFDelay inlining a function until late in the game (simplifier phase 0). vector inlined in phase 0    (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimentalportableSafea 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 hintsvector&Select a safe smaller than known size.vectorMaximum 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  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  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 >@AHSVX /vectorgClass of immutable vectors. Every immutable vector is associated with its mutable version through the 7K 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:012340vectorAssumed complexity: O(1)Unsafely convert a mutable vector to its immutable version without copying. The mutable vector may not be used after this operation.1vectorAssumed complexity: O(1)Unsafely convert an immutable vector to its mutable version without copying. The immutable vector may not be used after this operation.2vectorAssumed complexity: O(1)Yield the length of the vector.3vectorAssumed complexity: O(1)OYield a slice of the vector without copying it. No range checks are performed.4vectorAssumed 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 4 , 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.5vectorAssumed 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 4 and basicUnsafeWrite.6vector 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 all7vector 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.3vectorstarting indexvectorlength /23501467(c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNoneF 8;9:<=>?@AB 8;9:<=>?@AB32 (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone&'=?@AEHSXWDvectorMonadic streamsFvector*Result of taking a single step in a streamJvector Length of a DKvector Check if a D is emptyLvectorEmpty DMvector Singleton DNvector#Replicate a value to a given lengthOvectorYield a DO of values obtained by performing the monadic action the given number of timesQvector"Generate a stream from its indicesRvectorPrepend an elementSvectorAppend an elementTvectorConcatenate two DsUvectorFirst element of the D or error if emptyVvectorLast element of the D or error if emptyWvectorElement at the given positionXvector!Element at the given position or  if out of boundsYvectorGExtract a substream of the given length starting at the given position.ZvectorAll but the last element[vectorAll but the first element\vector The first n elements]vectorAll but the first n elements^vectorMap a function over a D_vectorMap a monadic function over a D`vector1Execute a monadic action for each element of the Davector Transform a D to use a different monadcvectorPair each element in a D with its indexdvectorPair each element in a D; with its index, starting from the right and counting downevectorZip two D!s with the given monadic functionuvector Check if two D s are equalvvectorLexicographically compare two Dswvector0Drop elements which do not satisfy the predicateyvector8Drop elements which do not satisfy the monadic predicatezvector Drop repeated adjacent elements.{vector5Longest 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 predicatevectorCheck whether the D contains an elementvector Inverse of vectorYield 3 the first element that satisfies the predicate or  if no such element exists.vectorYield < the first element that satisfies the monadic predicate or  if no such element exists.vectorYield A the index of the first element that satisfies the predicate or  if no such element exists.vectorYield I the index of the first element that satisfies the monadic predicate or  if no such element exists.vector Left foldvector!Left fold with a monadic operatorvectorSame as vectorLeft fold over a non-empty DvectorLeft fold over a non-empty D 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 D with a strict accumulatorvectorLeft fold over a non-empty D2 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 D of values from a D 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 DvectorScan over a non-empty D with a monadic operatorvectorScan over a non-empty D with a strict accumulatorvectorScan over a non-empty D2 with a strict accumulator and a monadic operatorvectorYield a D+ 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 D to a listvectorConvert a list to a DvectorConvert the first n elements of a list to a BundleYvectorstarting indexvectorlengthuDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~uDEFGHIJKLMRSNOPQTUVWXYZ[\]^_`abcdfeghijklmnopqrstuvwyzx{|}~T5W9 X9 44  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone&'=?@AEHSXFYvectorMonadic 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  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 3 the first element that satisfies the predicate or  if no such element exists.vectorYield < the first element that satisfies the monadic predicate or  if no such element exists.vectorYield A the index of the first element that satisfies the predicate or  if no such element exists.vectorYield I the index of the first element that satisfies the monadic predicate or  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 operator vectorSame 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 accumulator vector;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|      !"#$%&'()*+,-./0123|      !"#$%&'()*+,-./031259 9 44  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone=?SXD5vector$Alternative name for monadic streams6vectorThe type of pure streams8vector)Convert a pure stream to a monadic stream9vector hint of a 6:vector Attach a  hint to a 6;vector Length of a 6<vector Check if a 6 is empty=vectorEmpty 6>vector Singleton 6?vector#Replicate a value to a given length@vector"Generate a stream from its indicesAvectorPrepend an elementBvectorAppend an elementCvectorConcatenate two 6sDvectorFirst element of the 6 or error if emptyEvectorLast element of the 6 or error if emptyFvectorElement at the given positionGvector!Element at the given position or  if out of boundsHvectorGExtract a substream of the given length starting at the given position.IvectorAll but the last elementJvectorAll but the first elementKvector The first n elementsLvectorAll but the first n elementsMvectorMap a function over a 6PvectorPair each element in a 6 with its indexQvectorPair each element in a 6; with its index, starting from the right and counting downRvectorZip two 6s with the given functionSvector Zip three 6s 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 6 contains an element`vector Inverse of _avectorYield - the first element matching the predicate or  if no such element exists.bvectorYield ; the index of the first element matching the predicate or  if no such element exists.cvector Left folddvectorLeft fold on non-empty 6sevector!Left fold with strict accumulatorfvectorLeft fold on non-empty 6s with strict accumulatorgvector Right foldhvectorRight fold on non-empty 6skvectorUnfoldlvectorUnfold at most n elementsmvectorDApply function n-1 times to value. Zeroth element is original value.nvector Prefix scanovector#Prefix scan with strict accumulatorpvector Suffix scanqvector#Suffix scan with strict accumulatorrvectorHaskell-style scansvector*Haskell-style scan with strict accumulatortvectorScan over a non-empty 6uvectorScan over a non-empty 6 with a strict accumulatorvvector Check if two 6 s are equalxvectorLexicographically compare two 6szvector\Apply a monadic action to each element of the stream, producing a monadic stream of results{vector4Apply a monadic action to each element of the stream~vectorEYield a monadic stream of elements that satisfy the monadic predicatevector Monadic foldvector"Monadic fold over non-empty streamvector$Monadic fold with strict accumulatorvector8Monad fold over non-empty stream with strict accumulatorvectorYield a 6+ 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 6 to a listvector Create a 6 from a listvector Create a 6 from the first n elements of a list %fromListN n xs = fromList (take n xs)vector Create a 6 of values from a 6 of streamable thingsHvectorstarting indexvectorlength`FGHI56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~`FGHI6579:;<=>AB?@CDEFGHIJKLMONPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu8z{|}~vxwyC5F9 G9 _4`4  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone >@AHVXU$vector?Create a new mutable vector and fill it with elements from the 6A. The vector will grow exponentially if the maximum size of the 6 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 6A. The vector will grow exponentially if the maximum size of the 6 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 6U from right to left. The vector will grow exponentially if the maximum size of the 6 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 emptyvectorYYield a part of the mutable vector without copying it. The vector must contain at least i+n elements.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.vectorGrow 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.vectorEReplace the element at the given 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.vectorfReplace the element at the given 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 permutationvectori starting indexvectorn lengthvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourceJ!"#$%&'()*+,-.J!"#$%&'()*+,-.  (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 >@AHSVXIvectorO(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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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. BconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in <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. BconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in <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 elementvectorO(m+n) Concatenate two vectorsvectorO(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 (; 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 (; 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 +.0vectorO(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip -.1vector O(min(m,n))) Zip two vectors with the given function.2vector*Zip three vectors with the given function.6vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices.;vector 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 resultsAvector O(min(m,n))k Zip the two vectors with a monadic action that also takes the element index and yield a vector of resultsBvector O(min(m,n))D Zip the two vectors with the monadic action and ignore the resultsCvector O(min(m,n))d Zip the two vectors with a monadic action that also takes the element index and ignore the resultsDvector O(min(m,n)) Unzip a vector of pairs.IvectorO(n)0 Drop elements that do not satisfy the predicateJvectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indicesKvectorO(n)! Drop repeated adjacent elements.LvectorO(n)- Drop elements when predicate returns NothingMvectorO(n)J Drop elements when predicate, applied to index and value, returns NothingNvectorO(n)8 Drop elements that do not satisfy the monadic predicateOvectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.PvectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.QvectorO(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 S.SvectorO(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 Q.TvectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.UvectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.VvectorO(n)( Check if the vector contains an elementWvectorO(n)= Check if the vector does not contain an element (inverse of V)XvectorO(n) Yield - the first element matching the predicate or  if no such element exists.YvectorO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.ZvectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.[vectorO(n) Yield ; the index of the first occurence of the given element or O if the vector does not contain the element. This is a specialised version of Y.\vectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of Z.]vectorO(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 accumulatoravectorO(n) Right foldbvectorO(n) Right fold on non-empty vectorscvectorO(n)% Right fold with a strict accumulatordvectorO(n)8 Right fold on non-empty vectors with strict accumulatorevectorO(n); Left fold (function applied to each element and its index)fvectorO(n)T Left fold with strict accumulator (function applied to each element and its index)gvectorO(n)< Right fold (function applied to each element and its index)hvectorO(n)U Right fold with strict accumulator (function applied to each element and its index)ivectorO(n)- Check if all elements satisfy the predicate.jvectorO(n). Check if any element satisfies the predicate.kvectorO(n) Check if all elements are lvectorO(n) Check if any element is mvectorO(n) Compute the sum of the elementsnvectorO(n)$ Compute the produce of the elementsovectorO(n)G Yield the maximum element of the vector. The vector may not be empty.pvectorO(n)r Yield the maximum element of the vector according to the given comparison function. The vector may not be empty.qvectorO(n)G Yield the minimum element of the vector. The vector may not be empty.rvectorO(n)r Yield the minimum element of the vector according to the given comparison function. The vector may not be empty.svectorO(n)T Yield the index of the maximum element of the vector. The vector may not be empty.tvectorO(n) Yield the index of the maximum element of the vector according to the given comparison function. The vector may not be empty.uvectorO(n)T Yield the index of the minimum element of the vector. The vector may not be empty.vvectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.wvectorO(n) Monadic foldxvectorO(n)< Monadic fold (action applied to each element and its index)yvectorO(n)$ Monadic fold over non-empty vectorszvectorO(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 accumulator}vectorO(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 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)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 6vectorO(n) Construct a vector from a 6vectorO(1) Convert a vector to a 6, proceeding from right to leftvectorO(n) Construct a vector from a 6, 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 h and it is usually more appropriate to use those. This function is primarily intended for implementing ! instances for new vector types.vectorO(n)vectorO(n), Compare two vectors lexicographically. All /" instances are also instances of h and it is usually more appropriate to use those. This function is primarily intended for implementing ! instances for new vector types.vectorO(n)vectorGeneric definition of vectorGeneric definition of vectorNote: uses vectorGeneric 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)/23501467      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/23501467      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqruvstwxz{y|}~9 9 5V4W4  (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHV5jvector7Mutable boxed vectors keyed on the monad they live in ( or ST s).vectorLength of the mutable vector.vector!Check whether the vector is emptyvectorYYield a part of the mutable vector without copying it. The vector must contain at least i+n elements.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 permutationvectori starting indexvectorn lengthvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsource(( (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHSVX\vector,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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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. BconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in <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. BconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in <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)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 (8 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 (8 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 -> write 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./vector*Zip three vectors with the given function.3vector O(min(m,n))H Zip two vectors with a function that also takes the elements' indices.4vector<Zip three vectors and their indices with the given function.8vector&Elementwise pairing of array elements.9vector3zip together three vectors into a vector of triples=vector O(min(m,n)) Unzip a vector of pairs.Bvector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of resultsCvector O(min(m,n))k Zip the two vectors with a monadic action that also takes the element index and yield a vector of resultsDvector O(min(m,n))D Zip the two vectors with the monadic action and ignore the resultsEvector O(min(m,n))d Zip the two vectors with a monadic action that also takes the element index and ignore the resultsFvectorO(n)0 Drop elements that do not satisfy the predicateGvectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indicesHvectorO(n)! Drop repeated adjacent elements.IvectorO(n)- Drop elements when predicate returns NothingJvectorO(n)J Drop elements when predicate, applied to index and value, returns NothingKvectorO(n)8 Drop elements that do not satisfy the monadic predicateLvectorO(n)P Yield the longest prefix of elements satisfying the predicate without copying.MvectorO(n)Q Drop the longest prefix of elements that satisfy the predicate without copying.NvectorO(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 O.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 order of the elements is not preserved but the operation is often faster than N.P vectorO(n)@ Split the vector in two parts, the first one containing the Right( elements and the second containing the Left> elements. The relative order of the elements is preserved.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 - the first element matching the predicate or  if no such element exists.VvectorO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.WvectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.XvectorO(n) Yield ; the index of the first occurence of the given element or O 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 ivectorO(n) Check if any element is jvectorO(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)V Monadic 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(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. vector vectorvectori 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{|}~      !"#$%&'()*+,-./0123456789:;<BCDE=>?@AFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnorspqtuwxvyz{}~| 5S4T4 (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone2=?@AX^vector#Mutable vectors of primitive types.vector-offset, length, underlying mutable byte arrayvectorLength of the mutable vector.vector!Check whether the vector is emptyvectorYYield a part of the mutable vector without copying it. The vector must contain at least i+n elements.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 permutationvectori starting indexvectorn lengthvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsource)) (c) Roman Leshchinskiy 2008-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHSVXyvector"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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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. BconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in <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. BconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in <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 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 -> write v 0 'x') ( 3 'a') = <'x','a','a'> #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)M Apply the monadic action to all elements of a vector and ignore 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.0vector<Zip three vectors and their indices with the given function.4vector O(min(m,n))K Zip the two vectors with the monadic action and yield a vector of results5vector O(min(m,n))D Zip the two vectors with the monadic action and ignore the results6vectorO(n)0 Drop elements that do not satisfy the predicate7vectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indices8vectorO(n)! Drop repeated adjacent elements.9vectorO(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 predicate<vectorO(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)@ Split the vector in two parts, the first one containing the Right( elements and the second containing the Left> elements. The relative order of the elements is preserved.AvectorO(n)o Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying.BvectorO(n)v Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.CvectorO(n)( Check if the vector contains an elementDvectorO(n)= Check if the vector does not contain an element (inverse of C)EvectorO(n) Yield - the first element matching the predicate or  if no such element exists.FvectorO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.GvectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.HvectorO(n) Yield ; the index of the first occurence of the given element or O if the vector does not contain the element. This is a specialised version of F.IvectorO(n)p Yield the indices of all occurences of the given element in ascending order. This is a specialised version of G.JvectorO(n) Left foldKvectorO(n) Left fold on non-empty vectorsLvectorO(n)" Left fold with strict accumulatorMvectorO(n)7 Left fold on non-empty vectors with strict accumulatorNvectorO(n) Right foldOvectorO(n) Right fold on non-empty vectorsPvectorO(n)% Right fold with a strict accumulatorQvectorO(n)8 Right fold on non-empty vectors with strict accumulatorRvectorO(n); Left fold (function applied to each element and its index)SvectorO(n)T Left fold with strict accumulator (function applied to each element and its index)TvectorO(n)< Right fold (function applied to each element and its index)UvectorO(n)U Right fold with strict accumulator (function applied to each element and its index)VvectorO(n)- Check if all elements satisfy the predicate.WvectorO(n). Check if any element satisfies the predicate.XvectorO(n) Compute the sum of the elementsYvectorO(n)$ Compute the produce of the elementsZvectorO(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.avectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.bvectorO(n) Monadic foldcvectorO(n)$ Monadic fold over non-empty vectorsdvectorO(n)% Monadic fold with strict accumulatorevectorO(n)< Monadic fold over non-empty vectors with strict accumulatorfvectorO(n)& Monadic fold that discards the resultgvectorO(n)= Monadic fold over non-empty vectors that discards the resulthvectorO(n)> Monadic fold with strict accumulator that discards the resultivectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the resultjvectorO(n) Prescan prescanl f z =  . n f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>kvectorO(n) Prescan with strict accumulatorlvectorO(n) Scan postscanl f z =  . n f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>mvectorO(n) Scan with strict accumulatornvectorO(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>ovectorO(n)+ Haskell-style scan with strict accumulatorpvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xiqvectorO(n)7 Scan over a non-empty vector with a strict accumulatorrvectorO(n) Right-to-left prescan prescanr f z =  . j (flip f) z .  svectorO(n). Right-to-left prescan with strict accumulatortvectorO(n) Right-to-left scanuvectorO(n)+ Right-to-left scan with strict accumulatorvvectorO(n)! Right-to-left Haskell-style scanwvectorO(n)9 Right-to-left Haskell-style scan with strict accumulatorxvectorO(n)+ Right-to-left scan over a non-empty vectoryvectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorzvectorO(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. vectorvectori 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[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]`a^_bdcefhgijklmnopqrstuvwxyz{|}~5C4D4 (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 emptyvectorYYield a part of the mutable vector without copying it. The vector must contain at least i+n elements.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  with an offset and a length.Modifying data through the T 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  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 T afterwards is unsafe if the vector could have been frozen before the modification.vectorYield the underlying V together with the offset to the data and its length. Modifying the data through the D is unsafe if the vector could have frozen before the modification.vectorO(1) Yield the underlying  together with its length.CYou can assume the pointer points directly to the data (no offset).Modifying the data through the D 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.vectori starting indexvectorn lengthvectorstarting indexvectorlength of the slicevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourcevectortargetvectorsourcevectorpointervectoroffsetvectorlengthvectorpointervectorlength.. (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone 2=?@AHSVXivector-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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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. BconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in <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. BconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in <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 predicatevectorO(n)^ Drop elements that do not satisfy the predicate which is applied to values and their indicesvectorO(n)! Drop repeated adjacent elements.vectorO(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)@ Split the vector in two parts, the first one containing the Right( elements and the second containing the Left> elements. The relative order of the elements is preserved.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 element"vectorO(n)= Check if the vector does not contain an element (inverse of !)#vectorO(n) Yield - the first element matching the predicate or  if no such element exists.$vectorO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.%vectorO(n)L Yield the indices of elements satisfying the predicate in ascending order.&vectorO(n) Yield ; the index of the first occurence of the given element or O 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 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 accumulator/vectorO(n)8 Right fold on non-empty vectors with strict accumulator0vectorO(n); Left fold (function applied to each element and its index)1vectorO(n)T Left fold with strict accumulator (function applied to each element and its index)2vectorO(n)< Right fold (function applied to each element and its index)3vectorO(n)U Right fold with strict accumulator (function applied to each element and its index)4vectorO(n)- Check if all elements satisfy the predicate.5vectorO(n). Check if any element satisfies the predicate.6vectorO(n) Check if all elements are 7vectorO(n) Check if any element is 8vectorO(n) Compute the sum of the elements9vectorO(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.=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.AvectorO(n) Yield the index of the minimum element of the vector according to the given comparison function. The vector may not be empty.BvectorO(n) Monadic foldCvectorO(n)$ Monadic fold over non-empty vectorsDvectorO(n)% Monadic fold with strict accumulatorEvectorO(n)< Monadic fold over non-empty vectors with strict accumulatorFvectorO(n)& Monadic fold that discards the resultGvectorO(n)= Monadic fold over non-empty vectors that discards the resultHvectorO(n)> Monadic fold with strict accumulator that discards the resultIvectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the resultJvectorO(n) Prescan prescanl f z =  . N f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>KvectorO(n) Prescan with strict accumulatorLvectorO(n) Scan postscanl f z =  . N f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>MvectorO(n) Scan with strict accumulatorNvectorO(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>OvectorO(n)+ Haskell-style scan with strict accumulatorPvectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xiQvectorO(n)7 Scan over a non-empty vector with a strict accumulatorRvectorO(n) Right-to-left prescan prescanr f z =  . J (flip f) z .  SvectorO(n). Right-to-left prescan with strict accumulatorTvectorO(n) Right-to-left scanUvectorO(n)+ Right-to-left scan with strict accumulatorVvectorO(n)! Right-to-left Haskell-style scanWvectorO(n)9 Right-to-left Haskell-style scan with strict accumulatorXvectorO(n)+ Right-to-left scan over a non-empty vectorYvectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorZvectorO(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) 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.^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.avectorO(n)/ Yield an immutable copy of the mutable vector.bvectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.cvectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.dvectorO(1) Create a vector from a  with an offset and a length.)The data may not be modified through the  afterwards.0If your offset is 0 it is more efficient to use e.evectorO(1) Create a vector from a  and a length.HIt is assumed the pointer points directly to the data (no offset). Use d" if you need to specify an offset.)The data may not be modified through the  afterwards.fvectorO(1) Yield the underlying ` together with the offset to the data and its length. The data may not be modified through the .gvectorO(1) Yield the underlying  together with its length.CYou can assume the pointer points directly to the data (no offset).)The data may not be modified through the .hvectorePass a pointer to the vector's data to the IO action. The data may not be modified through the 'Ptr.r vectorvectori 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)dvectorpointervectoroffsetvectorlengthevectorpointervectorlength      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh      !"#$%&'()*+,-./0123456789:;<=@A>?BDCEFHGIJKLMNOPQRSTUVWXYZ[\]a`c^_bdefgh5!4"4 (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNone -12>@AHV vector vectorOtuvwx~}|{zy (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNoneHSVXvectorO(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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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 ' the next element and the new seed or  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. BconstructN 3 f = let a = f <> ; b = f <a> ; c = f <a,b> in <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. BconstructrN 3 f = let a = f <> ; b = f<a> ; c = f <b,a> in <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 (L 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 (L 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)@ Split the vector in two parts, the first one containing the Right( elements and the second containing the Left> elements. The relative order of the elements is preserved.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 - the first element matching the predicate or  if no such element exists. vectorO(n) Yield ; the index of the first element matching the predicate or  if no such element exists. vectorO(n)L Yield the indices of elements satisfying the predicate in ascending order. vectorO(n) Yield ; the index of the first occurence of the given element or O 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 vectorO(n) Check if any element is vectorO(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 accumulator-vectorO(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 result0vectorO(n)> Monadic fold with strict accumulator that discards the result1vectorO(n)n Monadic fold with strict accumulator that discards the result (action applied to each element and its index)2vectorO(n)V Monadic fold over non-empty vectors with strict accumulator that discards the result3vectorO(n) Prescan prescanl f z =  . 7 f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>4vectorO(n) Prescan with strict accumulator5vectorO(n) Scan postscanl f z =  . 7 f z  Example: &postscanl (+) 0 <1,2,3,4> = <1,3,6,10>6vectorO(n) Scan with strict accumulator7vectorO(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>8vectorO(n)+ Haskell-style scan with strict accumulator9vectorO(n) Scan over a non-empty vector Jscanl f <x1,...,xn> = <y1,...,yn> where y1 = x1 yi = f y(i-1) xi:vectorO(n)7 Scan over a non-empty vector with a strict accumulator;vectorO(n) Right-to-left prescan prescanr f z =  . 3 (flip f) z .  <vectorO(n). Right-to-left prescan with strict accumulator=vectorO(n) Right-to-left scan>vectorO(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 accumulatorAvectorO(n)+ Right-to-left scan over a non-empty vectorBvectorO(n)F Right-to-left scan over a non-empty vector with a strict accumulatorCvectorO(n) Convert a vector to a listDvectorO(n) Convert a list to a vectorEvectorO(n) Convert the first n elements of a list to a vector fromListN n xs = D ( n xs) FvectorO(1) Unsafe convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.GvectorO(1) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.HvectorO(n). Yield a mutable copy of the immutable vector.IvectorO(n)/ Yield an immutable copy of the mutable vector.JvectorO(n)n Copy an immutable vector into a mutable one. The two vectors must have the same length. This is not checked.KvectorO(n)Y Copy an immutable vector into a mutable one. The two vectors must have the same length.LvectorO(1) Zip 2 vectorsMvectorO(1) Unzip 2 vectorsNvectorO(1) Zip 3 vectorsOvectorO(1) Unzip 3 vectorsPvectorO(1) Zip 4 vectorsQvectorO(1) Unzip 4 vectorsRvectorO(1) Zip 5 vectorsSvectorO(1) Unzip 5 vectorsTvectorO(1) Zip 6 vectorsUvectorO(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)twx~}|{zy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUwx~}|{zytLNPRTMOQSU      !"%&#$'(*+),-.01/23456789:;<=>?@ABCDEIHKFGJ544 (c) Roman Leshchinskiy 2009-2010 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> experimental non-portableNoneY%]vectorLength of the mutable vector.^vector!Check whether the vector is empty_vectorYYield a part of the mutable vector without copying it. The vector must contain at least i+n elements.evectorWYield a part of the mutable vector without copying it. No bounds checks are performed.jvector"Check whether two vectors overlap.kvector,Create a mutable vector of the given length.lvectorKCreate a mutable vector of the given length. The memory is not initialized.mvectormCreate a mutable vector of the given length (0 if the length is negative) and fill it with an initial value.nvectorCreate 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.ovector"Create a copy of a mutable vector.pvectorLGrow a vector by the given number of elements. The number must be positive.qvectordGrow a vector by the given number of elements. The number must be positive but this is not checked.rvectorReset all elements of the vector to some undefined value, clearing all references to external objects. This is usually a noop for unboxed vectors.svector(Yield the element at the given position.tvector*Replace the element at the given position.uvector)Modify the element at the given position.vvector)Swap the elements at the given positions.wvectorHYield the element at the given position. No bounds checks are performed.xvectorJReplace the element at the given position. No bounds checks are performed.yvectorIModify the element at the given position. No bounds checks are performed.zvectorISwap 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 permutationvectorO(1) Zip 2 vectorsvectorO(1) Unzip 2 vectorsvectorO(1) Zip 3 vectorsvectorO(1) Unzip 3 vectorsvectorO(1) Zip 4 vectorsvectorO(1) Unzip 4 vectorsvectorO(1) Zip 5 vectorsvectorO(1) Unzip 5 vectorsvectorO(1) Zip 6 vectorsvectorO(1) Unzip 6 vectors_vectori starting indexvectorn lengthevectorstarting indexvectorlength of the slice|vectortargetvectorsource}vectortargetvectorsource~vectortargetvectorsourcevectortargetvectorsourceWtuvx~}|{zy]^_`abcdefghijklmnopqrstuvwxyz{|}~Wx~}|{zyvut]^_cd`abehifgjklmnopqrstuvwxyz{|~} !"#$%&&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPABQKRSTUVWXYZ[\]^_``abcdefghijklmnopqrstuvwxyz{|}~     e f g h i j k l m n o p q r s t u v w x y z { | } ~    e f g h i k m n o p q r s t u v w x y } ~  z { e f t w x u v  i j                                  ! " # $  % t u v w x ef&spq'()*+,-./tuvwxghik012mno34jl!56789:;<=>?@ ~yAzB{CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   @ @ e f t w x u v  i j                   Nef&spq'()*+,-./tuvwxghik012mno3jl!56789:;<=>?@ ~yAzB{CDEFGHIJMNOPQKLRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~@@eftwxuvij    NNef&spq'()*+,-./tuvwxghik012mno3jl!56789:<>?@ yAz{DEFGHIJRSTUVWXYZ[\]^_`abcdefghijkloqrtyz{|}~@@eftwxuvij    Nef&spq'()*+,-./tuvwxghik012mno3jl!56789:<>?@ yAz{DEFGHIJRSTUVWXYZ[\]^_`abcdefghijkloqrtyz{|}~N@ef&spq'()*+,-./tuvwxghik012mno3jl!56789:;<=>?@ ~yAzB{CDEFGHIJKLRSTUVWXYZ[\]^_`abcdefghijklmnopqrstyz{|}~MNOPQeftwxuvij    MNOPQ e i           &vector-0.12.1.2-FWeXzqARiSu45G657Sieqk!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.7.0.0-9xMM76CsovTEGnXCHiCdRJData.Primitive.TypesPrimBoxunBoxIdunId delay_inline delayed_min $fMonadId$fApplicativeId $fFunctorId $fMonadBox$fApplicativeBox $fFunctorBoxSizeExactMaxUnknownclampedSubtractsmaller smallerThanlargertoMax 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 unsafeUpdatereverseunstablePartitionunstablePartitionBundlepartitionBundlepartitionWithBundlenextPermutationNewcreaterunrunPrimapplymodifyWithBundle! 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 partition partitionWithspanbreak 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 liftReadsPrec mkVecConstr mkVecTypemkTypegunfolddataCastSTVectorIOVector$fMVectorMVectora$fTraversableVector$fFoldableVector$fAlternativeVector$fApplicativeVector$fMonadZipVector$fMonadPlusVector$fMonadFailVector $fMonadVector$fFunctorVector$fMonoidVector$fSemigroupVector $fOrd1Vector $fEq1Vector $fOrdVector $fEqVector$fVectorVectora $fDataVector$fIsListVector $fRead1Vector $fShow1Vector $fReadVector $fShowVector$fNFData1Vector$fNFDataVector$fNFData1MVector$fNFDataMVectorgetPtrsetPtrupdPtr unsafeCastunsafeFromForeignPtrunsafeFromForeignPtr0unsafeToForeignPtrunsafeToForeignPtr0 unsafeWithUnboxMV_6MV_5MV_4MV_3MV_2 MV_ComposeMV_AltMV_ConstMV_AllMV_AnyMV_ArgMV_WrappedMonoidMV_LastMV_FirstMV_MaxMV_Min MV_ProductMV_SumMV_DualMV_Down MV_Identity 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_Complex V_IdentityV_DownV_DualV_Sum V_ProductV_MinV_MaxV_FirstV_LastV_WrappedMonoidV_ArgV_AnyV_AllV_ConstV_Alt V_ComposeV_2V_3V_4V_5V_6