h$ߎپ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None 058:<ivector-circular String generate 1 f4Just (CircularVector {vector = ["a"], rotation = 0}) generate 0 fNothing generate 2 f8Just (CircularVector {vector = ["a","k"], rotation = 0})=vector-circularO(n) Construct a circular vector of the given length by applying the function to each index.This variant takes max n 1# for the supplied length parameter.,let f 0 = "a"; f _ = "k"; f :: Int -> StringtoList $ generate1 2 f ["a","k"]toList $ generate1 0 f["a"]toList $ generate1 (-1) f["a"]>vector-circularO(n) Apply function n times to value. Zeroth element is original value. When given a index n <= 0, then  is returned, otherwise .iterateN 3 (+1) 06Just (CircularVector {vector = [0,1,2], rotation = 0})iterateN 0 (+1) 0NothingiterateN (-1) (+1) 0Nothing?vector-circularO(n) Apply function n times to value. Zeroth element is original value.This variant takes max n 1# for the supplied length parameter.iterateN1 3 (+1) 0/CircularVector {vector = [0,1,2], rotation = 0}iterateN1 0 (+1) 0+CircularVector {vector = [0], rotation = 0}iterateN1 (-1) (+1) 0+CircularVector {vector = [0], rotation = 0}@vector-circularO(n) Execute the monadic action the given number of times and store the results in a circular vector. When given a index n <= 0, then  is returned, otherwise .replicateM @Maybe 3 (Just "a")Just (Just (CircularVector {vector = ["a","a","a"], rotation = 0}))replicateM @Maybe 3 NothingNothingreplicateM @Maybe 0 (Just "a") Just Nothing!replicateM @Maybe (-1) (Just "a") Just NothingAvector-circularO(n) Execute the monadic action the given number of times and store the results in a circular vector.This variant takes max n 1# for the supplied length parameter.replicate1M @Maybe 3 (Just "a") if i < 1 then ["a"] else ["b"])>[Just (CircularVector {vector = ["a","b","b"], rotation = 0})]generateM @[] @Int 3 (const [])[] generateM @[] @Int 0 (const [1]) [Nothing]*generateM @Maybe @Int (-1) (const Nothing) Just NothingCvector-circularO(n) Construct a circular vector of the given length by applying the monadic action to each indexThis variant takes max n 1# for the supplied length parameter.9generate1M 3 (\i -> if i < 1 then Just "a" else Just "b") case b of "a" -> Just ("a", "b"); _ -> Nothing) "a"4Just (CircularVector {vector = ["a"], rotation = 0})unfoldr (const Nothing) "a"NothingKvector-circularO(n) Construct a circular vector by repeatedly applying the generator function to a seed and a first element.This variant of J guarantees the resulting vector is non- empty by supplying an initial element a.unfoldr1 (\b -> case b of "a" -> Just ("a", "b"); _ -> Nothing) "first" "a"5CircularVector {vector = ["first","a"], rotation = 0}$unfoldr1 (const Nothing) "first" "a"1CircularVector {vector = ["first"], rotation = 0}Lvector-circularO(n) Construct a circular vector with at most n 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.0If an unfold does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.$unfoldrN 3 (\b -> Just (b+1, b+1)) 06Just (CircularVector {vector = [1,2,3], rotation = 0})unfoldrN 3 (const Nothing) 0Nothing$unfoldrN 0 (\b -> Just (b+1, b+1)) 0NothingMvector-circularO(n) Construct a circular vector with at most n 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.This variant of L guarantees the resulting vector is non- empty by supplying an initial element a.'unfoldr1N 3 (\b -> Just (b+1, b+1)) 0 01CircularVector {vector = [0,1,2,3], rotation = 0}unfoldr1N 3 (const Nothing) 0 0+CircularVector {vector = [0], rotation = 0}'unfoldr1N 0 (\b -> Just (b+1, b+1)) 0 0+CircularVector {vector = [0], rotation = 0}Nvector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.0If an unfold does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.Ovector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.This variant of N guarantees the resulting vector is non- empty by supplying an initial element a.Pvector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.0If an unfold does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.Qvector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.This variant of P guarantees the resulting vector is non- empty by supplying an initial element a.Rvector-circularO(n) Construct a circular vector with n elements by repeatedly applying the generator function to the already constructed part of the vector.If R$ does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.Svector-circularO(n) Construct a circular vector with n elements from right to left by repeatedly applying the generator function to the already constructed part of the vector.If S$ does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.Tvector-circularO(n) Yield a circular vector of the given length containing the values x, x+1 etc. This operation is usually more efficient than X.3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.Uvector-circularO(n)# Yield a circular vector of length max n 1 containing the values x, x+1 etc. This operation is usually more efficient than X.Vvector-circularO(n) Yield a circular vector of the given length containing the values x, x+y, x+y+y etc. This operations is usually more efficient than Y.3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.Wvector-circularO(n)# Yield a circular vector of length max n 1 containing the values x, x+y, x+y+y etc. This operations is usually more efficient than Y.Xvector-circularO(n) Enumerate values from x to y.3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.WARNING: This operation can be very inefficient. If at all possible, use T instead.Yvector-circularO(n)5 Enumerate values from x to y with a specific step z.3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.WARNING: This operation can be very inefficient. If at all possible, use V instead.Zvector-circularO(n) Prepend an elementcons 1 (unsafeFromList [2,3])/CircularVector {vector = [1,2,3], rotation = 0}[vector-circularO(n) Prepend an element to a VectorconsV 1 (Vector.fromList [2,3])/CircularVector {vector = [1,2,3], rotation = 0}\vector-circularO(n) Append an elementsnoc (unsafeFromList [1,2]) 3/CircularVector {vector = [1,2,3], rotation = 0}]vector-circularO(n) Append an element to a VectorsnocV (Vector.fromList [1,2]) 3/CircularVector {vector = [1,2,3], rotation = 0}^vector-circularO(m+n)! Concatenate two circular vectors2(unsafeFromList [1..3]) ++ (unsafeFromList [4..6])5CircularVector {vector = [1,2,3,4,5,6], rotation = 0}_vector-circularO(n)- Concatenate all circular vectors in the listIf list is empty,  is returned, otherwise . containing the concatenated circular vectors9concat [(unsafeFromList [1..3]), (unsafeFromList [4..6])]concat1 ((unsafeFromList [1..3]) :| [(unsafeFromList [4..6])])5CircularVector {vector = [1,2,3,4,5,6], rotation = 0}avector-circularO(n)' Map a function over a circular vector. map (+1) $ unsafeFromList [1..3]/CircularVector {vector = [2,3,4], rotation = 0}bvector-circularO(n) Apply a function to every element of a circular vector and its index.imap (\i a -> if i == 2 then a+1 else a+0) $ unsafeFromList [1..3]/CircularVector {vector = [1,2,4], rotation = 0}cvector-circularMap a function over a circular vector and concatenate the results.?concatMap (\a -> unsafeFromList [a,a]) (unsafeFromList [1,2,3])5CircularVector {vector = [1,1,2,2,3,3], rotation = 0}dvector-circularO(n) Apply the monadic action to all elements of the circular vector, yielding circular vector of results.!mapM Just (unsafeFromList [1..3])6Just (CircularVector {vector = [1,2,3], rotation = 0}),mapM (const Nothing) (unsafeFromList [1..3])Nothingevector-circularO(n) Apply the monadic action to every element of a circular vector and its index, yielding a circular vector of results.imapM (\i a -> if i == 1 then Just a else Just 0) (unsafeFromList [1..3])6Just (CircularVector {vector = [0,2,0], rotation = 0})/imapM (\_ _ -> Nothing) (unsafeFromList [1..3])Nothingfvector-circularO(n) Apply the monadic action to all elements of a circular vector and ignore the results./mapM_ (const $ Just ()) (unsafeFromList [1..3])Just ()-mapM_ (const Nothing) (unsafeFromList [1..3])Nothinggvector-circularO(n) Apply the monadic action to every element of a circular vector and its index, ignoring the resultsimapM_ (\i a -> if i == 1 then print a else putStrLn "0") (unsafeFromList [1..3])0200imapM_ (\_ _ -> Nothing) (unsafeFromList [1..3])Nothinghvector-circularO(n) Apply the monadic action to all elements of the circular vector, yielding a circular vector of results.Equivalent to flip d.ivector-circularO(n) Apply the monadic action to all elements of a circular vector and ignore the results.Equivalent to flip f.jvector-circularO(n)! Drop repeated adjacent elements..toList $ uniq $ unsafeFromList [1,1,2,2,3,3,1][1,2,3](toList $ uniq $ unsafeFromList [1,2,3,1][1,2,3]"toList $ uniq $ unsafeFromList [1][1]kvector-circularO(n)- Drop elements when predicate returns NothingIf no elements satisfy the predicate, the resulting vector may be empty.mapMaybe (\a -> if a == 2 then Nothing else Just a) (unsafeFromList [1..3])[1,3]lvector-circularO(n) Drop elements when predicate, applied to index and value, returns NothingIf no elements satisfy the predicate, the resulting vector may be empty.imapMaybe (\i a -> if a == 2 || i == 2 then Nothing else Just a) (unsafeFromList [1..3])[1]mvector-circularO(n) Yield the longest prefix of elements satisfying the predicate without copying.If no elements satisfy the predicate, the resulting vector may be empty.(takeWhile (/= 3) (unsafeFromList [1..3])[1,2]nvector-circularO(n) Drop the longest prefix of elements that satisfy the predicate without copying.If all elements satisfy the predicate, the resulting vector may be empty.(dropWhile (/= 3) (unsafeFromList [1..3])[3]ovector-circularO(n) Split the circular vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The relative order of the elements is preserved at the cost of a sometimes reduced performance compared to p.If all or no elements satisfy the predicate, one of the resulting vectors may be empty.'partition (< 3) (unsafeFromList [1..5])([1,2],[3,4,5])pvector-circularO(n) Split the circular vector in two parts, the first one containing those elements that satisfy the predicate and the second one those that don't. The order of the elements is not preserved but the operation is often faster than o.If all or no elements satisfy the predicate, one of the resulting vectors may be empty.qvector-circularO(n) Split the circular vector into the longest prefix of elements that satisfy the predicate and the rest without copying.If all or no elements satisfy the predicate, one of the resulting vectors may be empty.(span (== 1) (unsafeFromList [1,1,2,3,1])([1,1],[2,3,1])rvector-circularO(n) Split the circular vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.If all or no elements satisfy the predicate, one of the resulting vectors may be empty.)break (== 2) (unsafeFromList [1,1,2,3,1])([1,1],[2,3,1])svector-circularO(n)1 Check if the circular vector contains an elementelem 1 $ unsafeFromList [1..3]Trueelem 4 $ unsafeFromList [1..3]Falsetvector-circularO(n) Check if the circular vector does not contain an element (inverse of s)!notElem 1 $ unsafeFromList [1..3]False!notElem 4 $ unsafeFromList [1..3]Trueuvector-circularO(n) Yield . the first element matching the predicate or  if no such element exists."find (< 2) $ unsafeFromList [1..3]Just 1"find (< 0) $ unsafeFromList [1..3]Nothingvvector-circularO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.'findIndex (< 2) $ unsafeFromList [1..3]Just 0'findIndex (< 0) $ unsafeFromList [1..3]Nothing7findIndex (==1) $ rotateRight 1 (unsafeFromList [1..3])Just 2wvector-circularO(n) Yield the indices of elements satisfying the predicate in ascending order.)findIndices (< 3) $ unsafeFromList [1..3][0,1])findIndices (< 0) $ unsafeFromList [1..3][]xvector-circularO(n) Yield ; the index of the first occurence of the given element or  if the circular vector does not contain the element. This is a specialised version of v.#elemIndex 1 $ unsafeFromList [1..3]Just 0#elemIndex 0 $ unsafeFromList [1..3]Nothingyvector-circularO(n) Yield the indices of all occurences of the given element in ascending order. This is a specialised version of w.(elemIndices 1 $ unsafeFromList [1,2,3,1][0,3]%elemIndices 0 $ unsafeFromList [1..3][]zvector-circularO(n) Drop elements that do not satisfy the predicate which is applied to values and their indices.If no elements satisfy the predicate, the resulting vector may be empty.ifilter (\i a -> if a == 2 || i == 0 then False else True) (unsafeFromList [1..3])[3]/ifilter (\_ _ -> False) (unsafeFromList [1..3])[]{vector-circularO(n)9 Drop elements that do not satisfy the monadic predicate.If no elements satisfy the predicate, the resulting vector may be empty.filterM (\a -> if a == 2 then Just False else Just True) (unsafeFromList [1..3]) Just [1,3]filterM (\a -> if a == 2 then Nothing else Just True) (unsafeFromList [1..3])Nothing4filterM (const $ Just False) (unsafeFromList [1..3])Just []|vector-circularO(n) Drop elements that do not satisfy the monadic predicate that is a function of index and value.If no elements satisfy the predicate, the resulting vector may be empty.ifilterM (\i a -> if a == 2 || i == 0 then Just False else Just True) (unsafeFromList [1..3])Just [3]ifilterM (\i a -> if a == 2 || i == 0 then Nothing else Just True) (unsafeFromList [1..3])Nothing5ifilterM (\_ _ -> Just False) (unsafeFromList [1..3])Just []}vector-circularO(n)? Yield the circular vector obtained by replacing each element i! of the circular index vector by xs!i. This is equivalent to a (xs!) is" but is often much more efficient.toList $ backpermute (unsafeFromList [1..3]) (unsafeFromList [2,0])[3,1]~vector-circularSame as } but without bounds checking.vector-circularApply a destructive operation to a circular vector. The operation will be performed in place if it is safe to do so and will modify a copy of the circular vector otherwise.vector-circularvector-circularvector-circularvector-circularThe  () operation behaves by un-rolling the two vectors so that their rotation is 0, concatenating them, returning a new vector with a 0-rotation.vector-circularvector-circularvector-circularvector-circularvector-circularvector-circularvector-circularvector-circularvector-circularvector-circularvector-circularvector-circular  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`%$#&'( 0123456789./ !"abcdefghi)*+,jklz{|mnopqrstuvwxy-}~None058: Stringgenerate @Vector 1 f4Just (CircularVector {vector = ["a"], rotation = 0})generate @Vector 0 fNothinggenerate @Vector 2 f8Just (CircularVector {vector = ["a","k"], rotation = 0})vector-circularO(n) Construct a circular vector of the given length by applying the function to each index.This variant takes max n 1# for the supplied length parameter.,let f 0 = "a"; f _ = "k"; f :: Int -> StringtoList $ generate1 @Vector 2 f ["a","k"]toList $ generate1 @Vector 0 f["a"]!toList $ generate1 @Vector (-1) f["a"]vector-circularO(n) Apply function n times to value. Zeroth element is original value. When given a index n <= 0, then  is returned, otherwise .iterateN @Vector 3 (+1) 06Just (CircularVector {vector = [0,1,2], rotation = 0})iterateN @Vector 0 (+1) 0NothingiterateN @Vector (-1) (+1) 0Nothingvector-circularO(n) Apply function n times to value. Zeroth element is original value.This variant takes max n 1# for the supplied length parameter.iterateN1 @Vector 3 (+1) 0/CircularVector {vector = [0,1,2], rotation = 0}iterateN1 @Vector 0 (+1) 0+CircularVector {vector = [0], rotation = 0}iterateN1 @Vector (-1) (+1) 0+CircularVector {vector = [0], rotation = 0}vector-circularO(n) Execute the monadic action the given number of times and store the results in a circular vector. When given a index n <= 0, then  is returned, otherwise .&replicateM @Maybe @Vector 3 (Just "a")Just (Just (CircularVector {vector = ["a","a","a"], rotation = 0}))#replicateM @Maybe @Vector 3 NothingNothing&replicateM @Maybe @Vector 0 (Just "a") Just Nothing)replicateM @Maybe @Vector (-1) (Just "a") Just Nothingvector-circularO(n) Execute the monadic action the given number of times and store the results in a circular vector.This variant takes max n 1# for the supplied length parameter.'replicate1M @Maybe @Vector 3 (Just "a")generateM @[] @Vector 3 (\i -> if i < 1 then ["a"] else ["b"])>[Just (CircularVector {vector = ["a","b","b"], rotation = 0})]'generateM @[] @Vector @Int 3 (const [])[](generateM @[] @Vector @Int 0 (const [1]) [Nothing]2generateM @Maybe @Vector @Int (-1) (const Nothing) Just Nothingvector-circularO(n) Construct a circular vector of the given length by applying the monadic action to each indexThis variant takes max n 1# for the supplied length parameter.generate1M @Maybe @Vector 3 (\i -> if i < 1 then Just "a" else Just "b") case b of "a" -> Just ("a", "b"); _ -> Nothing) "a"4Just (CircularVector {vector = ["a"], rotation = 0})#unfoldr @Vector (const Nothing) "a"Nothingvector-circularO(n) Construct a circular vector by repeatedly applying the generator function to a seed and a first element.This variant of  guarantees the resulting vector is non- empty by supplying an initial element a.unfoldr1 @Vector (\b -> case b of "a" -> Just ("a", "b"); _ -> Nothing) "first" "a"5CircularVector {vector = ["first","a"], rotation = 0},unfoldr1 @Vector (const Nothing) "first" "a"1CircularVector {vector = ["first"], rotation = 0}vector-circularO(n) Construct a circular vector with at most n 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.0If an unfold does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.,unfoldrN @Vector 3 (\b -> Just (b+1, b+1)) 06Just (CircularVector {vector = [1,2,3], rotation = 0})$unfoldrN @Vector 3 (const Nothing) 0Nothing,unfoldrN @Vector 0 (\b -> Just (b+1, b+1)) 0Nothingvector-circularO(n) Construct a circular vector with at most n 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.This variant of  guarantees the resulting vector is non- empty by supplying an initial element a./unfoldr1N @Vector 3 (\b -> Just (b+1, b+1)) 0 01CircularVector {vector = [0,1,2,3], rotation = 0}'unfoldr1N @Vector 3 (const Nothing) 0 0+CircularVector {vector = [0], rotation = 0}/unfoldr1N @Vector 0 (\b -> Just (b+1, b+1)) 0 0+CircularVector {vector = [0], rotation = 0}vector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.0If an unfold does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.vector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.This variant of  guarantees the resulting vector is non- empty by supplying an initial element a.vector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.0If an unfold does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.vector-circularO(n) Construct a circular vector by repeatedly applying the monadic generator function to a seed. The generator function yields Just the next element and the new seed or Nothing if there are no more elements.This variant of  guarantees the resulting vector is non- empty by supplying an initial element a.vector-circularO(n) Construct a circular vector with n elements by repeatedly applying the generator function to the already constructed part of the vector.If $ does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.vector-circularO(n) Construct a circular vector with n elements from right to left by repeatedly applying the generator function to the already constructed part of the vector.If $ does not create meaningful values,  is returned. Otherwise, * containing a circular vector is returned.vector-circularO(n) Yield a circular vector of the given length containing the values x, x+1 etc. This operation is usually more efficient than .3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.vector-circularO(n)# Yield a circular vector of length max n 1 containing the values x, x+1 etc. This operation is usually more efficient than .vector-circularO(n) Yield a circular vector of the given length containing the values x, x+y, x+y+y etc. This operations is usually more efficient than .3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.vector-circularO(n)# Yield a circular vector of length max n 1 containing the values x, x+y, x+y+y etc. This operations is usually more efficient than .vector-circularO(n) Enumerate values from x to y.3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.WARNING: This operation can be very inefficient. If at all possible, use  instead.vector-circularO(n)5 Enumerate values from x to y with a specific step z.3If an enumeration does not use meaningful indices,  is returned, otherwise,  containing a circular vector.WARNING: This operation can be very inefficient. If at all possible, use  instead.vector-circularO(n) Prepend an element%cons 1 (unsafeFromList @Vector [2,3])/CircularVector {vector = [1,2,3], rotation = 0}vector-circularO(n) Prepend an element to a Vector$consV 1 (Data.Vector.fromList [2,3])/CircularVector {vector = [1,2,3], rotation = 0}vector-circularO(n) Append an element%snoc (unsafeFromList @Vector [1,2]) 3/CircularVector {vector = [1,2,3], rotation = 0}vector-circularO(n) Append an element to a Vector$snocV (Data.Vector.fromList [1,2]) 3/CircularVector {vector = [1,2,3], rotation = 0}vector-circularO(m+n)! Concatenate two circular vectors:(unsafeFromList @Vector [1..3]) ++ (unsafeFromList [4..6])5CircularVector {vector = [1,2,3,4,5,6], rotation = 0}vector-circularO(n)- Concatenate all circular vectors in the listIf list is empty,  is returned, otherwise . containing the concatenated circular vectorsconcat [(unsafeFromList @Vector [1..3]), (unsafeFromList [4..6])] if i == 2 then a+1 else a+0) $ unsafeFromList @Vector [1..3]/CircularVector {vector = [1,2,4], rotation = 0}vector-circularMap a function over a circular vector and concatenate the results.concatMap (\a -> unsafeFromList @Vector [a,a]) (unsafeFromList [1,2,3])5CircularVector {vector = [1,1,2,2,3,3], rotation = 0}vector-circularO(n) Apply the monadic action to all elements of the circular vector, yielding circular vector of results.)mapM Just (unsafeFromList @Vector [1..3])6Just (CircularVector {vector = [1,2,3], rotation = 0})4mapM (const Nothing) (unsafeFromList @Vector [1..3])Nothingvector-circularO(n) Apply the monadic action to every element of a circular vector and its index, yielding a circular vector of results.imapM (\i a -> if i == 1 then Just a else Just 0) (unsafeFromList @Vector [1..3])6Just (CircularVector {vector = [0,2,0], rotation = 0})7imapM (\_ _ -> Nothing) (unsafeFromList @Vector [1..3])Nothingvector-circularO(n) Apply the monadic action to all elements of a circular vector and ignore the results.7mapM_ (const $ Just ()) (unsafeFromList @Vector [1..3])Just ()5mapM_ (const Nothing) (unsafeFromList @Vector [1..3])Nothingvector-circularO(n) Apply the monadic action to every element of a circular vector and its index, ignoring the resultsimapM_ (\i a -> if i == 1 then print a else putStrLn "0") (unsafeFromList @Vector [1..3])0208imapM_ (\_ _ -> Nothing) (unsafeFromList @Vector [1..3])Nothingvector-circularO(n) Apply the monadic action to all elements of the circular vector, yielding a circular vector of results.Equivalent to flip .vector-circularO(n) Apply the monadic action to all elements of a circular vector and ignore the results.Equivalent to flip .vector-circularO(n)! Drop repeated adjacent elements.6toList $ uniq $ unsafeFromList @Vector [1,1,2,2,3,3,1][1,2,3]0toList $ uniq $ unsafeFromList @Vector [1,2,3,1][1,2,3]vector-circularO(n)- Drop elements when predicate returns NothingIf no elements satisfy the predicate, the resulting vector may be empty.mapMaybe (\a -> if a == 2 then Nothing else Just a) (unsafeFromList @Vector [1..3])[1,3]vector-circularO(n) Drop elements when predicate, applied to index and value, returns NothingIf no elements satisfy the predicate, the resulting vector may be empty.imapMaybe (\i a -> if a == 2 || i == 2 then Nothing else Just a) (unsafeFromList @Vector [1..3])[1]vector-circularO(n) Yield the longest prefix of elements satisfying the predicate without copying.If no elements satisfy the predicate, the resulting vector may be empty.0takeWhile (/= 3) (unsafeFromList @Vector [1..3])[1,2]vector-circularO(n) Drop the longest prefix of elements that satisfy the predicate without copying.If all elements satisfy the predicate, the resulting vector may be empty.0dropWhile (/= 3) (unsafeFromList @Vector [1..3])[3]vector-circularO(n) Split the circular 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 .If all or no elements satisfy the predicate, one of the resulting vectors may be empty./partition (< 3) (unsafeFromList @Vector [1..5])([1,2],[3,4,5])vector-circularO(n) Split the circular 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 .If all or no elements satisfy the predicate, one of the resulting vectors may be empty.vector-circularO(n) Split the circular vector into the longest prefix of elements that satisfy the predicate and the rest without copying.If all or no elements satisfy the predicate, one of the resulting vectors may be empty.0span (== 1) (unsafeFromList @Vector [1,1,2,3,1])([1,1],[2,3,1])vector-circularO(n) Split the circular vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying.If all or no elements satisfy the predicate, one of the resulting vectors may be empty.1break (== 2) (unsafeFromList @Vector [1,1,2,3,1])([1,1],[2,3,1])vector-circularO(n)1 Check if the circular vector contains an element&elem 1 $ unsafeFromList @Vector [1..3]True&elem 4 $ unsafeFromList @Vector [1..3]Falsevector-circularO(n) Check if the circular vector does not contain an element (inverse of ))notElem 1 $ unsafeFromList @Vector [1..3]False)notElem 4 $ unsafeFromList @Vector [1..3]Truevector-circularO(n) Yield . the first element matching the predicate or  if no such element exists.*find (< 2) $ unsafeFromList @Vector [1..3]Just 1*find (< 0) $ unsafeFromList @Vector [1..3]Nothingvector-circularO(n) Yield ; the index of the first element matching the predicate or  if no such element exists./findIndex (< 2) $ unsafeFromList @Vector [1..3]Just 0/findIndex (< 0) $ unsafeFromList @Vector [1..3]Nothing?findIndex (==1) $ rotateRight 1 (unsafeFromList @Vector [1..3])Just 2vector-circularO(n) Yield the indices of elements satisfying the predicate in ascending order.1findIndices (< 3) $ unsafeFromList @Vector [1..3][0,1]1findIndices (< 0) $ unsafeFromList @Vector [1..3][]vector-circularO(n) Yield ; the index of the first occurence of the given element or  if the circular vector does not contain the element. This is a specialised version of .+elemIndex 1 $ unsafeFromList @Vector [1..3]Just 0+elemIndex 0 $ unsafeFromList @Vector [1..3]Nothingvector-circularO(n) Yield the indices of all occurences of the given element in ascending order. This is a specialised version of .0elemIndices 1 $ unsafeFromList @Vector [1,2,3,1][0,3]-elemIndices 0 $ unsafeFromList @Vector [1..3][]vector-circularO(n) Drop elements that do not satisfy the predicate which is applied to values and their indices.If no elements satisfy the predicate, the resulting vector may be empty.ifilter (\i a -> if a == 2 || i == 0 then False else True) (unsafeFromList @Vector [1..3])[3]7ifilter (\_ _ -> False) (unsafeFromList @Vector [1..3])[]vector-circularO(n)9 Drop elements that do not satisfy the monadic predicate.If no elements satisfy the predicate, the resulting vector may be empty.filterM (\a -> if a == 2 then Just False else Just True) (unsafeFromList @Vector [1..3]) Just [1,3]filterM (\a -> if a == 2 then Nothing else Just True) (unsafeFromList @Vector [1..3])Nothing (a -> m) -> CircularVector v a -> m foldMap = Data.Vector.Circular.Generic.foldMap {- inline foldMap -}since 0.1.2 instance Foldable1 CircularVector where foldMap1 :: Semigroup m => (a -> m) -> CircularVector a -> m foldMap1 = Data.Vector.Circular.Generic.foldMap1 {- inline foldMap1 -} since 0.1.2vector-circularinstance Eq2 CircularVector where liftEq2 :: (a -> b -> Bool) -> CircularVector v a -> CircularVector v b -> Bool liftEq2 eq c0(CircularVector x rx) c1(CircularVector y ry) | G.length x /= G.length y = False | rx == ry = liftEq eq x y | otherwise = getAll $ flip Prelude.foldMap [0..NonEmpty.length x-1] $ i -> All (index c0 i eq index c1 i)instance Ord1 CircularVector where liftCompare :: (a -> b -> Ordering) -> CircularVector a -> CircularVector b -> Ordering liftCompare cmp (CircularVector x rx) (CircularVector y ry) = liftCompare cmp x y <> compare rx ryinstance Show1 CircularVector where liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> CircularVector a -> ShowS liftShowsPrec sp sl d (CircularVector x rx) = showsBinaryWith (liftShowsPrec sp sl) showsPrec CircularVector d x rxinstance Read1 CircularVector where liftReadPrec rp rl = readData $ readBinaryWith (liftReadPrec rp rl) readPrec CircularVector= CircularVector liftReadListPrec = liftReadListPrecDefaultThe  () operation behaves by un-rolling the two vectors so that their rotation is 0, concatenating them, returning a new vector with a 0-rotation. since 0.1.2vector-circularinstance Traversable (CircularVector v) where traverse :: (Applicative f) => (a -> f b) -> CircularVector a -> f (CircularVector b) traverse f (CircularVector v rot) = CircularVector  $ traverse f v  * pure rot since 0.1.2vector-circular since 0.1.2vector-circularvector-circular since 0.1.2vector-circular since 0.1.2vector-circular since 0.1.2vector-circular     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,vector-circular-0.1.2-ET8uaV3XFl9GpXakM5sa0PData.Vector.CircularData.Vector.Circular.Generic Data.ListcyclebaseGHC.ListfilterData.Traversablesequence Data.Foldable sequence_unzip3unzipdeepseq-1.4.4.0Control.DeepSeqforceCircularVectorvectorrotationfoldMapfoldMap'foldrfoldlfoldr'foldl'foldr1foldl1 toNonEmptyfoldMap1 foldMap1'toVectortoNonEmptyVector fromVector fromVector'unsafeFromVectortoListfromList fromListNunsafeFromListunsafeFromListN singletonindexheadlast rotateRight rotateLeftvec equivalentcanonise leastRotationzipWithzipWith3zipzip3reverserotateToMinimumByrotateToMaximumByallanyandorsumproductmaximum maximumByminimum minimumBy replicate replicate1generate generate1iterateN iterateN1 replicateM replicate1M generateM generate1M iterateNM iterateN1Mcreate unsafeCreatecreateT unsafeCreateTunfoldrunfoldr1unfoldrN unfoldr1NunfoldrM unfoldr1M unfoldrNM unfoldr1NM constructN constructrN enumFromN enumFromN1 enumFromStepNenumFromStepN1 enumFromToenumFromThenToconsconsVsnocsnocV++concatconcat1mapimap concatMapmapMimapMmapM_imapM_forMforM_uniqmapMaybe imapMaybe takeWhile dropWhile partitionunstablePartitionspanbreakelemnotElemfind findIndex findIndices elemIndex elemIndicesifilterfilterMifilterM backpermuteunsafeBackpermutemodify$fLiftLiftedRepCircularVector$fFoldable1CircularVector$fFoldableCircularVector$fSemigroupCircularVector$fRead1CircularVector$fShow1CircularVector$fOrd1CircularVector$fEq1CircularVector$fEqCircularVector$fTraversableCircularVector$fFunctorCircularVector$fGenericCircularVector$fOrdCircularVector$fReadCircularVector$fShowCircularVector$fNFDataCircularVector&vector-0.12.1.2-6jlbObSa8iuJfxUVGBQC5r Data.VectorVector.nonempty-vector-0.2.1.0-Fg8P01u7lpwGk8GIKt3gPnData.Vector.NonEmpty.InternalNonEmptyVectorGHC.Errerrorghc-prim GHC.Classes<=>GHC.EnummaxBound GHC.TypesInt GHC.MaybeNothingJustGHC.Base Semigroup<>