{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RankNTypes #-}
module Data.Vector.NonEmpty
(
NonEmptyVector
, length
, head, last, (!), (!?)
, unsafeIndex
, headM, lastM, indexM, unsafeIndexM
, tail, slice, init, take, drop
, uncons, unsnoc, splitAt
, unsafeSlice, unsafeTake, unsafeDrop
, singleton
, replicate, replicate1
, generate, generate1
, iterateN, iterateN1
, replicateM, replicate1M
, generateM, generate1M
, iterateNM, iterateN1M
, create, unsafeCreate
, createT, unsafeCreateT
, unfoldr, unfoldr1
, unfoldrN, unfoldr1N
, unfoldrM, unfoldr1M
, unfoldrNM, unfoldr1NM
, constructN, constructrN
, enumFromN, enumFromN1
, enumFromStepN, enumFromStepN1
, enumFromTo, enumFromThenTo
, cons, consV, snoc, snocV, (++), concat, concat1
, force
, toNonEmpty, fromNonEmpty
, fromNonEmptyN, fromNonEmptyN1
, unsafeFromList
, toVector, fromVector, unsafeFromVector
, toList, fromList, fromListN
, (//), update, update_
, unsafeUpd, unsafeUpdate, unsafeUpdate_
, accum, accumulate, accumulate_
, unsafeAccum, unsafeAccumulate, unsafeAccumulate_
, reverse, backpermute, unsafeBackpermute
, modify
, indexed
, map, imap, concatMap
, mapM, imapM, mapM_, imapM_
, forM, forM_
, zipWith, zipWith3, zipWith4, zipWith5, zipWith6
, izipWith, izipWith3, izipWith4, izipWith5, izipWith6
, zip, zip3, zip4, zip5, zip6
, zipWithM, zipWithM_, izipWithM, izipWithM_
, unzip, unzip3, unzip4, unzip5, unzip6
, uniq, mapMaybe, imapMaybe
, filter, ifilter, filterM, ifilterM
, takeWhile, dropWhile
, partition, partitionWith, unstablePartition, span, break
, elem, notElem, find, findIndex, findIndices, elemIndex
, elemIndices
, foldl, foldl1, foldl', foldl1'
, foldr, foldr1, foldr', foldr1'
, ifoldl, ifoldl', ifoldr, ifoldr'
, all, any, and, or, sum, product
, maximum, maximumBy, minimum, minimumBy
, maxIndex, maxIndexBy, minIndex, minIndexBy
, foldM, foldM', fold1M, fold1M', foldM_, foldM'_, fold1M_
, fold1M'_, ifoldM, ifoldM', ifoldM_, ifoldM'_
, sequence, sequence_
, prescanl, prescanl', postscanl, postscanl'
, scanl, scanl', scanl1, scanl1', iscanl, iscanl'
, prescanr, prescanr', postscanr, postscanr'
, scanr, scanr', scanr1, scanr1', iscanr, iscanr'
) where
import Prelude ( Bool, Eq, Ord, Num, Enum
, (.), Ordering, max, uncurry, snd)
import Control.Monad (Monad)
import Control.Monad.ST
import qualified Data.Foldable as Foldable
import Data.Either (Either(..))
import Data.Functor hiding (unzip)
import Data.Int
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.List.NonEmpty as NonEmpty
import Data.Maybe (Maybe(..))
import Data.Semigroup (Semigroup(..), (<>))
import Data.Traversable (Traversable)
import Data.Vector (Vector)
import qualified Data.Vector as V
import qualified Data.Vector.Generic as G
import Data.Vector.Mutable (MVector)
import Data.Vector.NonEmpty.Internal
length :: NonEmptyVector a -> Int
length :: forall a. NonEmptyVector a -> Int
length = forall a. Vector a -> Int
V.length forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE length #-}
head :: NonEmptyVector a -> a
head :: forall a. NonEmptyVector a -> a
head = forall a. Vector a -> a
V.unsafeHead forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE head #-}
last :: NonEmptyVector a -> a
last :: forall a. NonEmptyVector a -> a
last = forall a. Vector a -> a
V.unsafeLast forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE last #-}
(!) :: NonEmptyVector a -> Int -> a
! :: forall a. NonEmptyVector a -> Int -> a
(!) (NonEmptyVector Vector a
as) Int
n = Vector a
as forall a. Vector a -> Int -> a
V.! Int
n
{-# INLINE (!) #-}
(!?) :: NonEmptyVector a -> Int -> Maybe a
(NonEmptyVector Vector a
as) !? :: forall a. NonEmptyVector a -> Int -> Maybe a
!? Int
n = Vector a
as forall a. Vector a -> Int -> Maybe a
V.!? Int
n
{-# INLINE (!?) #-}
unsafeIndex :: NonEmptyVector a -> Int -> a
unsafeIndex :: forall a. NonEmptyVector a -> Int -> a
unsafeIndex (NonEmptyVector Vector a
as) Int
n = forall a. Vector a -> Int -> a
V.unsafeIndex Vector a
as Int
n
{-# INLINE unsafeIndex #-}
indexM :: Monad m => NonEmptyVector a -> Int -> m a
indexM :: forall (m :: * -> *) a. Monad m => NonEmptyVector a -> Int -> m a
indexM (NonEmptyVector Vector a
v) Int
n = forall (m :: * -> *) a. Monad m => Vector a -> Int -> m a
V.indexM Vector a
v Int
n
{-# INLINE indexM #-}
headM :: Monad m => NonEmptyVector a -> m a
headM :: forall (m :: * -> *) a. Monad m => NonEmptyVector a -> m a
headM (NonEmptyVector Vector a
v) = forall (m :: * -> *) a. Monad m => Vector a -> m a
V.unsafeHeadM Vector a
v
{-# INLINE headM #-}
lastM :: Monad m => NonEmptyVector a -> m a
lastM :: forall (m :: * -> *) a. Monad m => NonEmptyVector a -> m a
lastM (NonEmptyVector Vector a
v) = forall (m :: * -> *) a. Monad m => Vector a -> m a
V.unsafeLastM Vector a
v
{-# INLINE lastM #-}
unsafeIndexM :: Monad m => NonEmptyVector a -> Int -> m a
unsafeIndexM :: forall (m :: * -> *) a. Monad m => NonEmptyVector a -> Int -> m a
unsafeIndexM (NonEmptyVector Vector a
v) Int
n = forall (m :: * -> *) a. Monad m => Vector a -> Int -> m a
V.unsafeIndexM Vector a
v Int
n
{-# INLINE unsafeIndexM #-}
tail :: NonEmptyVector a -> Vector a
tail :: forall a. NonEmptyVector a -> Vector a
tail = forall a. Vector a -> Vector a
V.unsafeTail forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE tail #-}
uncons :: NonEmptyVector a -> (a, Vector a)
uncons :: forall a. NonEmptyVector a -> (a, Vector a)
uncons NonEmptyVector a
v = (forall a. NonEmptyVector a -> a
head NonEmptyVector a
v, forall a. NonEmptyVector a -> Vector a
tail NonEmptyVector a
v)
{-# INLINE uncons #-}
unsnoc :: NonEmptyVector a -> (Vector a, a)
unsnoc :: forall a. NonEmptyVector a -> (Vector a, a)
unsnoc NonEmptyVector a
v = (forall a. NonEmptyVector a -> Vector a
init NonEmptyVector a
v, forall a. NonEmptyVector a -> a
last NonEmptyVector a
v)
{-# INLINE unsnoc #-}
slice :: Int -> Int -> NonEmptyVector a -> Vector a
slice :: forall a. Int -> Int -> NonEmptyVector a -> Vector a
slice Int
i Int
n = forall a. Int -> Int -> Vector a -> Vector a
V.slice Int
i Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE slice #-}
init :: NonEmptyVector a -> Vector a
init :: forall a. NonEmptyVector a -> Vector a
init = forall a. Vector a -> Vector a
V.unsafeInit forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE init #-}
take :: Int -> NonEmptyVector a -> Vector a
take :: forall a. Int -> NonEmptyVector a -> Vector a
take Int
n = forall a. Int -> Vector a -> Vector a
V.take Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE take #-}
drop :: Int -> NonEmptyVector a -> Vector a
drop :: forall a. Int -> NonEmptyVector a -> Vector a
drop Int
n = forall a. Int -> Vector a -> Vector a
V.drop Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE drop #-}
splitAt :: Int -> NonEmptyVector a -> (Vector a, Vector a)
splitAt :: forall a. Int -> NonEmptyVector a -> (Vector a, Vector a)
splitAt Int
n = forall a. Int -> Vector a -> (Vector a, Vector a)
V.splitAt Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE splitAt #-}
unsafeSlice :: Int -> Int -> NonEmptyVector a -> Vector a
unsafeSlice :: forall a. Int -> Int -> NonEmptyVector a -> Vector a
unsafeSlice Int
i Int
n = forall a. Int -> Int -> Vector a -> Vector a
V.unsafeSlice Int
i Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE unsafeSlice #-}
unsafeTake :: Int -> NonEmptyVector a -> Vector a
unsafeTake :: forall a. Int -> NonEmptyVector a -> Vector a
unsafeTake Int
n = forall a. Int -> Vector a -> Vector a
V.unsafeTake Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE unsafeTake #-}
unsafeDrop :: Int -> NonEmptyVector a -> Vector a
unsafeDrop :: forall a. Int -> NonEmptyVector a -> Vector a
unsafeDrop Int
n = forall a. Int -> Vector a -> Vector a
V.unsafeDrop Int
n forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE unsafeDrop #-}
singleton :: a -> NonEmptyVector a
singleton :: forall a. a -> NonEmptyVector a
singleton = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. a -> Vector a
V.singleton
{-# INLINE singleton #-}
replicate :: Int -> a -> Maybe (NonEmptyVector a)
replicate :: forall a. Int -> a -> Maybe (NonEmptyVector a)
replicate Int
n a
a = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> a -> Vector a
V.replicate Int
n a
a)
{-# INLINE replicate #-}
replicate1 :: Int -> a -> NonEmptyVector a
replicate1 :: forall a. Int -> a -> NonEmptyVector a
replicate1 Int
n a
a = forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall a. Int -> a -> Vector a
V.replicate (forall a. Ord a => a -> a -> a
max Int
n Int
1) a
a)
{-# INLINE replicate1 #-}
generate :: Int -> (Int -> a) -> Maybe (NonEmptyVector a)
generate :: forall a. Int -> (Int -> a) -> Maybe (NonEmptyVector a)
generate Int
n Int -> a
f = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> (Int -> a) -> Vector a
V.generate Int
n Int -> a
f)
{-# INLINE generate #-}
generate1 :: Int -> (Int -> a) -> NonEmptyVector a
generate1 :: forall a. Int -> (Int -> a) -> NonEmptyVector a
generate1 Int
n Int -> a
f = forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall a. Int -> (Int -> a) -> Vector a
V.generate (forall a. Ord a => a -> a -> a
max Int
n Int
1) Int -> a
f)
{-# INLINE generate1 #-}
iterateN :: Int -> (a -> a) -> a -> Maybe (NonEmptyVector a)
iterateN :: forall a. Int -> (a -> a) -> a -> Maybe (NonEmptyVector a)
iterateN Int
n a -> a
f a
a = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> (a -> a) -> a -> Vector a
V.iterateN Int
n a -> a
f a
a)
{-# INLINE iterateN #-}
iterateN1 :: Int -> (a -> a) -> a -> NonEmptyVector a
iterateN1 :: forall a. Int -> (a -> a) -> a -> NonEmptyVector a
iterateN1 Int
n a -> a
f a
a = forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall a. Int -> (a -> a) -> a -> Vector a
V.iterateN (forall a. Ord a => a -> a -> a
max Int
n Int
1) a -> a
f a
a)
{-# INLINE iterateN1 #-}
replicateM :: Monad m => Int -> m a -> m (Maybe (NonEmptyVector a))
replicateM :: forall (m :: * -> *) a.
Monad m =>
Int -> m a -> m (Maybe (NonEmptyVector a))
replicateM Int
n m a
a = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (m :: * -> *) a. Monad m => Int -> m a -> m (Vector a)
V.replicateM Int
n m a
a)
{-# INLINE replicateM #-}
replicate1M :: Monad m => Int -> m a -> m (NonEmptyVector a)
replicate1M :: forall (m :: * -> *) a.
Monad m =>
Int -> m a -> m (NonEmptyVector a)
replicate1M Int
n m a
a = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall (m :: * -> *) a. Monad m => Int -> m a -> m (Vector a)
V.replicateM (forall a. Ord a => a -> a -> a
max Int
n Int
1) m a
a)
{-# INLINE replicate1M #-}
generateM :: Monad m => Int -> (Int -> m a) -> m (Maybe (NonEmptyVector a))
generateM :: forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Maybe (NonEmptyVector a))
generateM Int
n Int -> m a
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
V.generateM Int
n Int -> m a
f)
{-# INLINE generateM #-}
generate1M :: Monad m => Int -> (Int -> m a) -> m (NonEmptyVector a)
generate1M :: forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (NonEmptyVector a)
generate1M Int
n Int -> m a
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
V.generateM (forall a. Ord a => a -> a -> a
max Int
n Int
1) Int -> m a
f)
{-# INLINE generate1M #-}
iterateNM :: Monad m => Int -> (a -> m a) -> a -> m (Maybe (NonEmptyVector a))
iterateNM :: forall (m :: * -> *) a.
Monad m =>
Int -> (a -> m a) -> a -> m (Maybe (NonEmptyVector a))
iterateNM Int
n a -> m a
f a
a = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (m :: * -> *) a.
Monad m =>
Int -> (a -> m a) -> a -> m (Vector a)
V.iterateNM Int
n a -> m a
f a
a)
{-# INLINE iterateNM #-}
iterateN1M :: Monad m => Int -> (a -> m a) -> a -> m (NonEmptyVector a)
iterateN1M :: forall (m :: * -> *) a.
Monad m =>
Int -> (a -> m a) -> a -> m (NonEmptyVector a)
iterateN1M Int
n a -> m a
f a
a = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall (m :: * -> *) a.
Monad m =>
Int -> (a -> m a) -> a -> m (Vector a)
V.iterateNM (forall a. Ord a => a -> a -> a
max Int
n Int
1) a -> m a
f a
a)
{-# INLINE iterateN1M #-}
create :: (forall s. ST s (MVector s a)) -> Maybe (NonEmptyVector a)
create :: forall a.
(forall s. ST s (MVector s a)) -> Maybe (NonEmptyVector a)
create forall s. ST s (MVector s a)
p = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (v :: * -> *) a.
Vector v a =>
(forall s. ST s (Mutable v s a)) -> v a
G.create forall s. ST s (MVector s a)
p)
{-# INLINE create #-}
unsafeCreate :: (forall s. ST s (MVector s a)) -> NonEmptyVector a
unsafeCreate :: forall a. (forall s. ST s (MVector s a)) -> NonEmptyVector a
unsafeCreate forall s. ST s (MVector s a)
p = forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall (v :: * -> *) a.
Vector v a =>
(forall s. ST s (Mutable v s a)) -> v a
G.create forall s. ST s (MVector s a)
p)
{-# INLINE unsafeCreate #-}
createT
:: Traversable t
=> (forall s. ST s (t (MVector s a)))
-> t (Maybe (NonEmptyVector a))
createT :: forall (t :: * -> *) a.
Traversable t =>
(forall s. ST s (t (MVector s a))) -> t (Maybe (NonEmptyVector a))
createT forall s. ST s (t (MVector s a))
p = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (f :: * -> *) (v :: * -> *) a.
(Traversable f, Vector v a) =>
(forall s. ST s (f (Mutable v s a))) -> f (v a)
G.createT forall s. ST s (t (MVector s a))
p)
{-# INLINE createT #-}
unsafeCreateT
:: Traversable t
=> (forall s. ST s (t (MVector s a)))
-> t (NonEmptyVector a)
unsafeCreateT :: forall (t :: * -> *) a.
Traversable t =>
(forall s. ST s (t (MVector s a))) -> t (NonEmptyVector a)
unsafeCreateT forall s. ST s (t (MVector s a))
p = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall (f :: * -> *) (v :: * -> *) a.
(Traversable f, Vector v a) =>
(forall s. ST s (f (Mutable v s a))) -> f (v a)
G.createT forall s. ST s (t (MVector s a))
p)
{-# INLINE unsafeCreateT #-}
unfoldr :: (b -> Maybe (a, b)) -> b -> Maybe (NonEmptyVector a)
unfoldr :: forall b a. (b -> Maybe (a, b)) -> b -> Maybe (NonEmptyVector a)
unfoldr b -> Maybe (a, b)
f b
b = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall b a. (b -> Maybe (a, b)) -> b -> Vector a
V.unfoldr b -> Maybe (a, b)
f b
b)
{-# INLINE unfoldr #-}
unfoldr1 :: (b -> Maybe (a, b)) -> a -> b -> NonEmptyVector a
unfoldr1 :: forall b a. (b -> Maybe (a, b)) -> a -> b -> NonEmptyVector a
unfoldr1 b -> Maybe (a, b)
f a
a b
b = forall a. a -> NonEmptyVector a -> NonEmptyVector a
cons a
a (forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall b a. (b -> Maybe (a, b)) -> b -> Vector a
V.unfoldr b -> Maybe (a, b)
f b
b))
{-# INLINE unfoldr1 #-}
unfoldrN :: Int -> (b -> Maybe (a, b)) -> b -> Maybe (NonEmptyVector a)
unfoldrN :: forall b a.
Int -> (b -> Maybe (a, b)) -> b -> Maybe (NonEmptyVector a)
unfoldrN Int
n b -> Maybe (a, b)
f b
b = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall b a. Int -> (b -> Maybe (a, b)) -> b -> Vector a
V.unfoldrN Int
n b -> Maybe (a, b)
f b
b)
{-# INLINE unfoldrN #-}
unfoldr1N
:: Int
-> (b -> Maybe (a, b))
-> a
-> b
-> NonEmptyVector a
unfoldr1N :: forall b a.
Int -> (b -> Maybe (a, b)) -> a -> b -> NonEmptyVector a
unfoldr1N Int
n b -> Maybe (a, b)
f a
a b
b = forall a. a -> NonEmptyVector a -> NonEmptyVector a
cons a
a (forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall b a. Int -> (b -> Maybe (a, b)) -> b -> Vector a
V.unfoldrN Int
n b -> Maybe (a, b)
f b
b))
{-# INLINE unfoldr1N #-}
unfoldrM
:: Monad m
=> (b -> m (Maybe (a, b)))
-> b
-> m (Maybe (NonEmptyVector a))
unfoldrM :: forall (m :: * -> *) b a.
Monad m =>
(b -> m (Maybe (a, b))) -> b -> m (Maybe (NonEmptyVector a))
unfoldrM b -> m (Maybe (a, b))
f b
b = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (m :: * -> *) b a.
Monad m =>
(b -> m (Maybe (a, b))) -> b -> m (Vector a)
V.unfoldrM b -> m (Maybe (a, b))
f b
b)
{-# INLINE unfoldrM #-}
unfoldr1M
:: Monad m
=> (b -> m (Maybe (a, b)))
-> a
-> b
-> m (NonEmptyVector a)
unfoldr1M :: forall (m :: * -> *) b a.
Monad m =>
(b -> m (Maybe (a, b))) -> a -> b -> m (NonEmptyVector a)
unfoldr1M b -> m (Maybe (a, b))
f a
a b
b = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. a -> NonEmptyVector a -> NonEmptyVector a
cons a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> NonEmptyVector a
unsafeFromVector) (forall (m :: * -> *) b a.
Monad m =>
(b -> m (Maybe (a, b))) -> b -> m (Vector a)
V.unfoldrM b -> m (Maybe (a, b))
f b
b)
{-# INLINE unfoldr1M #-}
unfoldrNM
:: Monad m
=> Int
-> (b -> m (Maybe (a, b)))
-> b
-> m (Maybe (NonEmptyVector a))
unfoldrNM :: forall (m :: * -> *) b a.
Monad m =>
Int -> (b -> m (Maybe (a, b))) -> b -> m (Maybe (NonEmptyVector a))
unfoldrNM Int
n b -> m (Maybe (a, b))
f b
b = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall (m :: * -> *) b a.
Monad m =>
Int -> (b -> m (Maybe (a, b))) -> b -> m (Vector a)
V.unfoldrNM Int
n b -> m (Maybe (a, b))
f b
b)
{-# INLINE unfoldrNM #-}
unfoldr1NM
:: Monad m
=> Int
-> (b -> m (Maybe (a, b)))
-> a
-> b
-> m (NonEmptyVector a)
unfoldr1NM :: forall (m :: * -> *) b a.
Monad m =>
Int -> (b -> m (Maybe (a, b))) -> a -> b -> m (NonEmptyVector a)
unfoldr1NM Int
n b -> m (Maybe (a, b))
f a
a b
b = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a. a -> NonEmptyVector a -> NonEmptyVector a
cons a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> NonEmptyVector a
unsafeFromVector) (forall (m :: * -> *) b a.
Monad m =>
Int -> (b -> m (Maybe (a, b))) -> b -> m (Vector a)
V.unfoldrNM Int
n b -> m (Maybe (a, b))
f b
b)
{-# INLINE unfoldr1NM #-}
constructN :: Int -> (Vector a -> a) -> Maybe (NonEmptyVector a)
constructN :: forall a. Int -> (Vector a -> a) -> Maybe (NonEmptyVector a)
constructN Int
n Vector a -> a
f = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> (Vector a -> a) -> Vector a
V.constructN Int
n Vector a -> a
f)
{-# INLINE constructN #-}
constructrN :: Int -> (Vector a -> a) -> Maybe (NonEmptyVector a)
constructrN :: forall a. Int -> (Vector a -> a) -> Maybe (NonEmptyVector a)
constructrN Int
n Vector a -> a
f = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> (Vector a -> a) -> Vector a
V.constructrN Int
n Vector a -> a
f)
{-# INLINE constructrN #-}
enumFromN :: Num a => a -> Int -> Maybe (NonEmptyVector a)
enumFromN :: forall a. Num a => a -> Int -> Maybe (NonEmptyVector a)
enumFromN a
a Int
n = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Num a => a -> Int -> Vector a
V.enumFromN a
a Int
n)
{-# INLINE enumFromN #-}
enumFromN1 :: Num a => a -> Int -> NonEmptyVector a
enumFromN1 :: forall a. Num a => a -> Int -> NonEmptyVector a
enumFromN1 a
a Int
n = forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall a. Num a => a -> Int -> Vector a
V.enumFromN a
a (forall a. Ord a => a -> a -> a
max Int
n Int
1))
{-# INLINE enumFromN1 #-}
enumFromStepN :: Num a => a -> a -> Int -> Maybe (NonEmptyVector a)
enumFromStepN :: forall a. Num a => a -> a -> Int -> Maybe (NonEmptyVector a)
enumFromStepN a
a0 a
a1 Int
n = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Num a => a -> a -> Int -> Vector a
V.enumFromStepN a
a0 a
a1 Int
n)
{-# INLINE enumFromStepN #-}
enumFromStepN1 :: Num a => a -> a -> Int -> NonEmptyVector a
enumFromStepN1 :: forall a. Num a => a -> a -> Int -> NonEmptyVector a
enumFromStepN1 a
a0 a
a1 Int
n = forall a. Vector a -> NonEmptyVector a
unsafeFromVector (forall a. Num a => a -> a -> Int -> Vector a
V.enumFromStepN a
a0 a
a1 (forall a. Ord a => a -> a -> a
max Int
n Int
1))
{-# INLINE enumFromStepN1 #-}
enumFromTo :: Enum a => a -> a -> Maybe (NonEmptyVector a)
enumFromTo :: forall a. Enum a => a -> a -> Maybe (NonEmptyVector a)
enumFromTo a
a0 a
a1 = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Enum a => a -> a -> Vector a
V.enumFromTo a
a0 a
a1)
{-# INLINE enumFromTo #-}
enumFromThenTo :: Enum a => a -> a -> a -> Maybe (NonEmptyVector a)
enumFromThenTo :: forall a. Enum a => a -> a -> a -> Maybe (NonEmptyVector a)
enumFromThenTo a
a0 a
a1 a
a2 = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Enum a => a -> a -> a -> Vector a
V.enumFromThenTo a
a0 a
a1 a
a2)
{-# INLINE enumFromThenTo #-}
cons :: a -> NonEmptyVector a -> NonEmptyVector a
cons :: forall a. a -> NonEmptyVector a -> NonEmptyVector a
cons a
a (NonEmptyVector Vector a
as) = forall a. a -> Vector a -> NonEmptyVector a
consV a
a Vector a
as
{-# INLINE cons #-}
consV :: a -> Vector a -> NonEmptyVector a
consV :: forall a. a -> Vector a -> NonEmptyVector a
consV a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. a -> Vector a -> Vector a
V.cons a
a
{-# INLINE consV #-}
snoc :: NonEmptyVector a -> a -> NonEmptyVector a
snoc :: forall a. NonEmptyVector a -> a -> NonEmptyVector a
snoc (NonEmptyVector Vector a
as) = forall a. Vector a -> a -> NonEmptyVector a
snocV Vector a
as
{-# INLINE snoc #-}
snocV :: Vector a -> a -> NonEmptyVector a
snocV :: forall a. Vector a -> a -> NonEmptyVector a
snocV Vector a
as = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> a -> Vector a
V.snoc Vector a
as
{-# INLINE snocV #-}
(++) :: NonEmptyVector a -> NonEmptyVector a -> NonEmptyVector a
NonEmptyVector Vector a
v ++ :: forall a. NonEmptyVector a -> NonEmptyVector a -> NonEmptyVector a
++ NonEmptyVector Vector a
v' = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (Vector a
v forall a. Semigroup a => a -> a -> a
<> Vector a
v')
{-# INLINE (++) #-}
concat :: [NonEmptyVector a] -> Maybe (NonEmptyVector a)
concat :: forall a. [NonEmptyVector a] -> Maybe (NonEmptyVector a)
concat [] = forall a. Maybe a
Nothing
concat (NonEmptyVector a
a:[NonEmptyVector a]
as) = forall a. a -> Maybe a
Just (forall a. NonEmpty (NonEmptyVector a) -> NonEmptyVector a
concat1 (NonEmptyVector a
a forall a. a -> [a] -> NonEmpty a
:| [NonEmptyVector a]
as))
{-# INLINE concat #-}
concat1 :: NonEmpty (NonEmptyVector a) -> NonEmptyVector a
concat1 :: forall a. NonEmpty (NonEmptyVector a) -> NonEmptyVector a
concat1 = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
Foldable.foldl' forall {a}. Vector a -> NonEmptyVector a -> Vector a
go forall a. Vector a
V.empty
where
go :: Vector a -> NonEmptyVector a -> Vector a
go Vector a
v (NonEmptyVector Vector a
a) = Vector a
v forall a. Semigroup a => a -> a -> a
<> Vector a
a
{-# INLINE concat1 #-}
toNonEmpty :: NonEmptyVector a -> NonEmpty a
toNonEmpty :: forall a. NonEmptyVector a -> NonEmpty a
toNonEmpty = forall a. [a] -> NonEmpty a
NonEmpty.fromList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> [a]
V.toList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE toNonEmpty #-}
fromNonEmpty :: NonEmpty a -> NonEmptyVector a
fromNonEmpty :: forall a. NonEmpty a -> NonEmptyVector a
fromNonEmpty = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> Vector a
V.fromList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (t :: * -> *) a. Foldable t => t a -> [a]
Foldable.toList
{-# INLINE fromNonEmpty #-}
fromNonEmptyN :: Int -> NonEmpty a -> Maybe (NonEmptyVector a)
fromNonEmptyN :: forall a. Int -> NonEmpty a -> Maybe (NonEmptyVector a)
fromNonEmptyN Int
n NonEmpty a
a = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> [a] -> Vector a
V.fromListN Int
n (forall (t :: * -> *) a. Foldable t => t a -> [a]
Foldable.toList NonEmpty a
a))
{-# INLINE fromNonEmptyN #-}
fromNonEmptyN1 :: Int -> NonEmpty a -> NonEmptyVector a
fromNonEmptyN1 :: forall a. Int -> NonEmpty a -> NonEmptyVector a
fromNonEmptyN1 Int
n = forall a. Vector a -> NonEmptyVector a
unsafeFromVector
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Int -> [a] -> Vector a
V.fromListN (forall a. Ord a => a -> a -> a
max Int
n Int
1)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (t :: * -> *) a. Foldable t => t a -> [a]
Foldable.toList
{-# INLINE fromNonEmptyN1 #-}
toVector :: NonEmptyVector a -> Vector a
toVector :: forall a. NonEmptyVector a -> Vector a
toVector = forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE toVector #-}
fromVector :: Vector a -> Maybe (NonEmptyVector a)
fromVector :: forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector Vector a
v = if forall a. Vector a -> Bool
V.null Vector a
v then forall a. Maybe a
Nothing else forall a. a -> Maybe a
Just (forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector a
v)
{-# INLINE fromVector #-}
unsafeFromVector :: Vector a -> NonEmptyVector a
unsafeFromVector :: forall a. Vector a -> NonEmptyVector a
unsafeFromVector = forall a. Vector a -> NonEmptyVector a
NonEmptyVector
{-# INLINE unsafeFromVector #-}
toList :: NonEmptyVector a -> [a]
toList :: forall a. NonEmptyVector a -> [a]
toList = forall a. Vector a -> [a]
V.toList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE toList #-}
fromList :: [a] -> Maybe (NonEmptyVector a)
fromList :: forall a. [a] -> Maybe (NonEmptyVector a)
fromList = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> Vector a
V.fromList
{-# INLINE fromList #-}
unsafeFromList :: [a] -> NonEmptyVector a
unsafeFromList :: forall a. [a] -> NonEmptyVector a
unsafeFromList = forall a. Vector a -> NonEmptyVector a
unsafeFromVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> Vector a
V.fromList
{-# INLINE unsafeFromList #-}
fromListN :: Int -> [a] -> Maybe (NonEmptyVector a)
fromListN :: forall a. Int -> [a] -> Maybe (NonEmptyVector a)
fromListN Int
n [a]
as = forall a. Vector a -> Maybe (NonEmptyVector a)
fromVector (forall a. Int -> [a] -> Vector a
V.fromListN Int
n [a]
as)
{-# INLINE fromListN #-}
force :: NonEmptyVector a -> NonEmptyVector a
force :: forall a. NonEmptyVector a -> NonEmptyVector a
force (NonEmptyVector Vector a
a) = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector a
V.force Vector a
a)
{-# INLINE force #-}
(//) :: NonEmptyVector a -> [(Int, a)] -> NonEmptyVector a
NonEmptyVector Vector a
v // :: forall a. NonEmptyVector a -> [(Int, a)] -> NonEmptyVector a
// [(Int, a)]
us = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (Vector a
v forall a. Vector a -> [(Int, a)] -> Vector a
V.// [(Int, a)]
us)
{-# INLINE (//) #-}
update :: NonEmptyVector a -> Vector (Int, a) -> NonEmptyVector a
update :: forall a. NonEmptyVector a -> Vector (Int, a) -> NonEmptyVector a
update (NonEmptyVector Vector a
v) Vector (Int, a)
v' = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector (Int, a) -> Vector a
V.update Vector a
v Vector (Int, a)
v')
{-# INLINE update #-}
update_ :: NonEmptyVector a -> Vector Int -> Vector a -> NonEmptyVector a
update_ :: forall a.
NonEmptyVector a -> Vector Int -> Vector a -> NonEmptyVector a
update_ (NonEmptyVector Vector a
v) Vector Int
is Vector a
as = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector Int -> Vector a -> Vector a
V.update_ Vector a
v Vector Int
is Vector a
as)
{-# INLINE update_ #-}
unsafeUpd :: NonEmptyVector a -> [(Int, a)] -> NonEmptyVector a
unsafeUpd :: forall a. NonEmptyVector a -> [(Int, a)] -> NonEmptyVector a
unsafeUpd (NonEmptyVector Vector a
v) [(Int, a)]
us = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> [(Int, a)] -> Vector a
V.unsafeUpd Vector a
v [(Int, a)]
us)
{-# INLINE unsafeUpd #-}
unsafeUpdate :: NonEmptyVector a -> Vector (Int, a) -> NonEmptyVector a
unsafeUpdate :: forall a. NonEmptyVector a -> Vector (Int, a) -> NonEmptyVector a
unsafeUpdate (NonEmptyVector Vector a
v) Vector (Int, a)
us = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector (Int, a) -> Vector a
V.unsafeUpdate Vector a
v Vector (Int, a)
us)
{-# INLINE unsafeUpdate #-}
unsafeUpdate_ :: NonEmptyVector a -> Vector Int -> Vector a -> NonEmptyVector a
unsafeUpdate_ :: forall a.
NonEmptyVector a -> Vector Int -> Vector a -> NonEmptyVector a
unsafeUpdate_ (NonEmptyVector Vector a
v) Vector Int
is Vector a
as = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector Int -> Vector a -> Vector a
V.unsafeUpdate_ Vector a
v Vector Int
is Vector a
as)
{-# INLINE unsafeUpdate_ #-}
accum
:: (a -> b -> a)
-> NonEmptyVector a
-> [(Int, b)]
-> NonEmptyVector a
accum :: forall a b.
(a -> b -> a) -> NonEmptyVector a -> [(Int, b)] -> NonEmptyVector a
accum a -> b -> a
f (NonEmptyVector Vector a
v) [(Int, b)]
u = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b. (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
V.accum a -> b -> a
f Vector a
v [(Int, b)]
u)
{-# INLINE accum #-}
accumulate
:: (a -> b -> a)
-> NonEmptyVector a
-> Vector (Int, b)
-> NonEmptyVector a
accumulate :: forall a b.
(a -> b -> a)
-> NonEmptyVector a -> Vector (Int, b) -> NonEmptyVector a
accumulate a -> b -> a
f (NonEmptyVector Vector a
v) Vector (Int, b)
u = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b.
(a -> b -> a) -> Vector a -> Vector (Int, b) -> Vector a
V.accumulate a -> b -> a
f Vector a
v Vector (Int, b)
u)
{-# INLINE accumulate #-}
accumulate_
:: (a -> b -> a)
-> NonEmptyVector a
-> Vector Int
-> Vector b
-> NonEmptyVector a
accumulate_ :: forall a b.
(a -> b -> a)
-> NonEmptyVector a -> Vector Int -> Vector b -> NonEmptyVector a
accumulate_ a -> b -> a
f (NonEmptyVector Vector a
v) Vector Int
i Vector b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b.
(a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
V.accumulate_ a -> b -> a
f Vector a
v Vector Int
i Vector b
b)
{-# INLINE accumulate_ #-}
unsafeAccum
:: (a -> b -> a)
-> NonEmptyVector a
-> [(Int, b)]
-> NonEmptyVector a
unsafeAccum :: forall a b.
(a -> b -> a) -> NonEmptyVector a -> [(Int, b)] -> NonEmptyVector a
unsafeAccum a -> b -> a
f (NonEmptyVector Vector a
v) [(Int, b)]
u = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b. (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
V.unsafeAccum a -> b -> a
f Vector a
v [(Int, b)]
u)
{-# INLINE unsafeAccum #-}
unsafeAccumulate
:: (a -> b -> a)
-> NonEmptyVector a
-> Vector (Int, b)
-> NonEmptyVector a
unsafeAccumulate :: forall a b.
(a -> b -> a)
-> NonEmptyVector a -> Vector (Int, b) -> NonEmptyVector a
unsafeAccumulate a -> b -> a
f NonEmptyVector a
v Vector (Int, b)
u = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b.
(a -> b -> a) -> Vector a -> Vector (Int, b) -> Vector a
V.unsafeAccumulate a -> b -> a
f Vector a
v' Vector (Int, b)
u)
where
v' :: Vector a
v' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
v
{-# INLINE unsafeAccumulate #-}
unsafeAccumulate_
:: (a -> b -> a)
-> NonEmptyVector a
-> Vector Int
-> Vector b
-> NonEmptyVector a
unsafeAccumulate_ :: forall a b.
(a -> b -> a)
-> NonEmptyVector a -> Vector Int -> Vector b -> NonEmptyVector a
unsafeAccumulate_ a -> b -> a
f NonEmptyVector a
v Vector Int
i Vector b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b.
(a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
V.unsafeAccumulate_ a -> b -> a
f Vector a
v' Vector Int
i Vector b
b)
where
v' :: Vector a
v' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
v
{-# INLINE unsafeAccumulate_ #-}
reverse :: NonEmptyVector a -> NonEmptyVector a
reverse :: forall a. NonEmptyVector a -> NonEmptyVector a
reverse = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> Vector a
V.reverse forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE reverse #-}
backpermute :: NonEmptyVector a -> NonEmptyVector Int -> NonEmptyVector a
backpermute :: forall a.
NonEmptyVector a -> NonEmptyVector Int -> NonEmptyVector a
backpermute (NonEmptyVector Vector a
v) (NonEmptyVector Vector Int
i)
= forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector Int -> Vector a
V.backpermute Vector a
v Vector Int
i)
{-# INLINE backpermute #-}
unsafeBackpermute
:: NonEmptyVector a
-> NonEmptyVector Int
-> NonEmptyVector a
unsafeBackpermute :: forall a.
NonEmptyVector a -> NonEmptyVector Int -> NonEmptyVector a
unsafeBackpermute (NonEmptyVector Vector a
v) (NonEmptyVector Vector Int
i)
= forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a. Vector a -> Vector Int -> Vector a
V.unsafeBackpermute Vector a
v Vector Int
i)
{-# INLINE unsafeBackpermute #-}
modify
:: (forall s. MVector s a -> ST s ())
-> NonEmptyVector a
-> NonEmptyVector a
modify :: forall a.
(forall s. MVector s a -> ST s ())
-> NonEmptyVector a -> NonEmptyVector a
modify forall s. MVector s a -> ST s ()
p (NonEmptyVector Vector a
v) = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a.
(forall s. MVector s a -> ST s ()) -> Vector a -> Vector a
V.modify forall s. MVector s a -> ST s ()
p Vector a
v)
{-# INLINE modify #-}
indexed :: NonEmptyVector a -> NonEmptyVector (Int, a)
indexed :: forall a. NonEmptyVector a -> NonEmptyVector (Int, a)
indexed = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> Vector (Int, a)
V.indexed forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE indexed #-}
map :: (a -> b) -> NonEmptyVector a -> NonEmptyVector b
map :: forall a b. (a -> b) -> NonEmptyVector a -> NonEmptyVector b
map a -> b
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b) -> Vector a -> Vector b
V.map a -> b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE map #-}
imap :: (Int -> a -> b) -> NonEmptyVector a -> NonEmptyVector b
imap :: forall a b. (Int -> a -> b) -> NonEmptyVector a -> NonEmptyVector b
imap Int -> a -> b
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Int -> a -> b) -> Vector a -> Vector b
V.imap Int -> a -> b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE imap #-}
concatMap
:: (a -> NonEmptyVector b)
-> NonEmptyVector a
-> NonEmptyVector b
concatMap :: forall a b.
(a -> NonEmptyVector b) -> NonEmptyVector a -> NonEmptyVector b
concatMap a -> NonEmptyVector b
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> Vector b) -> Vector a -> Vector b
V.concatMap (forall a. NonEmptyVector a -> Vector a
_neVec forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> NonEmptyVector b
f) forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE concatMap #-}
mapM :: Monad m => (a -> m b) -> NonEmptyVector a -> m (NonEmptyVector b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> NonEmptyVector a -> m (NonEmptyVector b)
mapM a -> m b
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Vector a -> m (Vector b)
V.mapM a -> m b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE mapM #-}
imapM
:: Monad m
=> (Int -> a -> m b)
-> NonEmptyVector a
-> m (NonEmptyVector b)
imapM :: forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> NonEmptyVector a -> m (NonEmptyVector b)
imapM Int -> a -> m b
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m (Vector b)
V.imapM Int -> a -> m b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE imapM #-}
mapM_ :: Monad m => (a -> m b) -> NonEmptyVector a -> m ()
mapM_ :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> NonEmptyVector a -> m ()
mapM_ a -> m b
f = forall (m :: * -> *) a b. Monad m => (a -> m b) -> Vector a -> m ()
V.mapM_ a -> m b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE mapM_ #-}
imapM_ :: Monad m => (Int -> a -> m b) -> NonEmptyVector a -> m ()
imapM_ :: forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> NonEmptyVector a -> m ()
imapM_ Int -> a -> m b
f = forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
V.imapM_ Int -> a -> m b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE imapM_ #-}
forM :: Monad m => NonEmptyVector a -> (a -> m b) -> m (NonEmptyVector b)
forM :: forall (m :: * -> *) a b.
Monad m =>
NonEmptyVector a -> (a -> m b) -> m (NonEmptyVector b)
forM (NonEmptyVector Vector a
v) a -> m b
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall (m :: * -> *) a b.
Monad m =>
Vector a -> (a -> m b) -> m (Vector b)
V.forM Vector a
v a -> m b
f)
{-# INLINE forM #-}
forM_ :: Monad m => NonEmptyVector a -> (a -> m b) -> m ()
forM_ :: forall (m :: * -> *) a b.
Monad m =>
NonEmptyVector a -> (a -> m b) -> m ()
forM_ (NonEmptyVector Vector a
v) a -> m b
f = forall (m :: * -> *) a b. Monad m => Vector a -> (a -> m b) -> m ()
V.forM_ Vector a
v a -> m b
f
{-# INLINE forM_ #-}
zipWith
:: (a -> b -> c)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
zipWith :: forall a b c.
(a -> b -> c)
-> NonEmptyVector a -> NonEmptyVector b -> NonEmptyVector c
zipWith a -> b -> c
f NonEmptyVector a
a NonEmptyVector b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c. (a -> b -> c) -> Vector a -> Vector b -> Vector c
V.zipWith a -> b -> c
f Vector a
a' Vector b
b')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
{-# INLINE zipWith #-}
zipWith3
:: (a -> b -> c -> d)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
zipWith3 :: forall a b c d.
(a -> b -> c -> d)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
zipWith3 a -> b -> c -> d
f NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d.
(a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
V.zipWith3 a -> b -> c -> d
f Vector a
a' Vector b
b' Vector c
c')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
{-# INLINE zipWith3 #-}
zipWith4
:: (a -> b -> c -> d -> e)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
zipWith4 :: forall a b c d e.
(a -> b -> c -> d -> e)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
zipWith4 a -> b -> c -> d -> e
f NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e.
(a -> b -> c -> d -> e)
-> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
V.zipWith4 a -> b -> c -> d -> e
f Vector a
a' Vector b
b' Vector c
c' Vector d
d')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
{-# INLINE zipWith4 #-}
zipWith5
:: (a -> b -> c -> d -> e -> f)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
zipWith5 :: forall a b c d e f.
(a -> b -> c -> d -> e -> f)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
zipWith5 a -> b -> c -> d -> e -> f
f NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d NonEmptyVector e
e = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e f.
(a -> b -> c -> d -> e -> f)
-> Vector a
-> Vector b
-> Vector c
-> Vector d
-> Vector e
-> Vector f
V.zipWith5 a -> b -> c -> d -> e -> f
f Vector a
a' Vector b
b' Vector c
c' Vector d
d' Vector e
e')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
e' :: Vector e
e' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector e
e
{-# INLINE zipWith5 #-}
zipWith6
:: (a -> b -> c -> d -> e -> f -> g)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
-> NonEmptyVector g
zipWith6 :: forall a b c d e f g.
(a -> b -> c -> d -> e -> f -> g)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
-> NonEmptyVector g
zipWith6 a -> b -> c -> d -> e -> f -> g
k NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d NonEmptyVector e
e NonEmptyVector f
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e f g.
(a -> b -> c -> d -> e -> f -> g)
-> Vector a
-> Vector b
-> Vector c
-> Vector d
-> Vector e
-> Vector f
-> Vector g
V.zipWith6 a -> b -> c -> d -> e -> f -> g
k Vector a
a' Vector b
b' Vector c
c' Vector d
d' Vector e
e' Vector f
f')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
e' :: Vector e
e' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector e
e
f' :: Vector f
f' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector f
f
{-# INLINE zipWith6 #-}
izipWith
:: (Int -> a -> b -> c)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
izipWith :: forall a b c.
(Int -> a -> b -> c)
-> NonEmptyVector a -> NonEmptyVector b -> NonEmptyVector c
izipWith Int -> a -> b -> c
f NonEmptyVector a
a NonEmptyVector b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c.
(Int -> a -> b -> c) -> Vector a -> Vector b -> Vector c
V.izipWith Int -> a -> b -> c
f Vector a
a' Vector b
b')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
{-# INLINE izipWith #-}
izipWith3
:: (Int -> a -> b -> c -> d)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
izipWith3 :: forall a b c d.
(Int -> a -> b -> c -> d)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
izipWith3 Int -> a -> b -> c -> d
f NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d.
(Int -> a -> b -> c -> d)
-> Vector a -> Vector b -> Vector c -> Vector d
V.izipWith3 Int -> a -> b -> c -> d
f Vector a
a' Vector b
b' Vector c
c')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
{-# INLINE izipWith3 #-}
izipWith4
:: (Int -> a -> b -> c -> d -> e)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
izipWith4 :: forall a b c d e.
(Int -> a -> b -> c -> d -> e)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
izipWith4 Int -> a -> b -> c -> d -> e
f NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e.
(Int -> a -> b -> c -> d -> e)
-> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
V.izipWith4 Int -> a -> b -> c -> d -> e
f Vector a
a' Vector b
b' Vector c
c' Vector d
d')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
{-# INLINE izipWith4 #-}
izipWith5
:: (Int -> a -> b -> c -> d -> e -> f)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
izipWith5 :: forall a b c d e f.
(Int -> a -> b -> c -> d -> e -> f)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
izipWith5 Int -> a -> b -> c -> d -> e -> f
f NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d NonEmptyVector e
e = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e f.
(Int -> a -> b -> c -> d -> e -> f)
-> Vector a
-> Vector b
-> Vector c
-> Vector d
-> Vector e
-> Vector f
V.izipWith5 Int -> a -> b -> c -> d -> e -> f
f Vector a
a' Vector b
b' Vector c
c' Vector d
d' Vector e
e')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
e' :: Vector e
e' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector e
e
{-# INLINE izipWith5 #-}
izipWith6
:: (Int -> a -> b -> c -> d -> e -> f -> g)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
-> NonEmptyVector g
izipWith6 :: forall a b c d e f g.
(Int -> a -> b -> c -> d -> e -> f -> g)
-> NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
-> NonEmptyVector g
izipWith6 Int -> a -> b -> c -> d -> e -> f -> g
k NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d NonEmptyVector e
e NonEmptyVector f
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e f g.
(Int -> a -> b -> c -> d -> e -> f -> g)
-> Vector a
-> Vector b
-> Vector c
-> Vector d
-> Vector e
-> Vector f
-> Vector g
V.izipWith6 Int -> a -> b -> c -> d -> e -> f -> g
k Vector a
a' Vector b
b' Vector c
c' Vector d
d' Vector e
e' Vector f
f')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
e' :: Vector e
e' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector e
e
f' :: Vector f
f' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector f
f
{-# INLINE izipWith6 #-}
zip :: NonEmptyVector a -> NonEmptyVector b -> NonEmptyVector (a, b)
zip :: forall a b.
NonEmptyVector a -> NonEmptyVector b -> NonEmptyVector (a, b)
zip NonEmptyVector a
a NonEmptyVector b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b. Vector a -> Vector b -> Vector (a, b)
V.zip Vector a
a' Vector b
b')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
{-# INLINE zip #-}
zip3
:: NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector (a, b, c)
zip3 :: forall a b c.
NonEmptyVector a
-> NonEmptyVector b -> NonEmptyVector c -> NonEmptyVector (a, b, c)
zip3 NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c. Vector a -> Vector b -> Vector c -> Vector (a, b, c)
V.zip3 Vector a
a' Vector b
b' Vector c
c')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
{-# INLINE zip3 #-}
zip4
:: NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector (a, b, c, d)
zip4 :: forall a b c d.
NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector (a, b, c, d)
zip4 NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d.
Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d)
V.zip4 Vector a
a' Vector b
b' Vector c
c' Vector d
d')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
{-# INLINE zip4 #-}
zip5
:: NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector (a, b, c, d, e)
zip5 :: forall a b c d e.
NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector (a, b, c, d, e)
zip5 NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d NonEmptyVector e
e = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e.
Vector a
-> Vector b
-> Vector c
-> Vector d
-> Vector e
-> Vector (a, b, c, d, e)
V.zip5 Vector a
a' Vector b
b' Vector c
c' Vector d
d' Vector e
e')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
e' :: Vector e
e' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector e
e
{-# INLINE zip5 #-}
zip6
:: NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
-> NonEmptyVector (a, b, c, d, e, f)
zip6 :: forall a b c d e f.
NonEmptyVector a
-> NonEmptyVector b
-> NonEmptyVector c
-> NonEmptyVector d
-> NonEmptyVector e
-> NonEmptyVector f
-> NonEmptyVector (a, b, c, d, e, f)
zip6 NonEmptyVector a
a NonEmptyVector b
b NonEmptyVector c
c NonEmptyVector d
d NonEmptyVector e
e NonEmptyVector f
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall a b c d e f.
Vector a
-> Vector b
-> Vector c
-> Vector d
-> Vector e
-> Vector f
-> Vector (a, b, c, d, e, f)
V.zip6 Vector a
a' Vector b
b' Vector c
c' Vector d
d' Vector e
e' Vector f
f')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
c' :: Vector c
c' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector c
c
d' :: Vector d
d' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector d
d
e' :: Vector e
e' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector e
e
f' :: Vector f
f' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector f
f
{-# INLINE zip6 #-}
zipWithM
:: Monad m
=> (a -> b -> m c)
-> NonEmptyVector a
-> NonEmptyVector b
-> m (NonEmptyVector c)
zipWithM :: forall (m :: * -> *) a b c.
Monad m =>
(a -> b -> m c)
-> NonEmptyVector a -> NonEmptyVector b -> m (NonEmptyVector c)
zipWithM a -> b -> m c
f NonEmptyVector a
a NonEmptyVector b
b = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall (m :: * -> *) a b c.
Monad m =>
(a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
V.zipWithM a -> b -> m c
f Vector a
a' Vector b
b')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
{-# INLINE zipWithM #-}
izipWithM
:: Monad m
=> (Int -> a -> b -> m c)
-> NonEmptyVector a
-> NonEmptyVector b
-> m (NonEmptyVector c)
izipWithM :: forall (m :: * -> *) a b c.
Monad m =>
(Int -> a -> b -> m c)
-> NonEmptyVector a -> NonEmptyVector b -> m (NonEmptyVector c)
izipWithM Int -> a -> b -> m c
f NonEmptyVector a
a NonEmptyVector b
b = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
NonEmptyVector (forall (m :: * -> *) a b c.
Monad m =>
(Int -> a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
V.izipWithM Int -> a -> b -> m c
f Vector a
a' Vector b
b')
where
a' :: Vector a
a' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a
b' :: Vector b
b' = forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b
{-# INLINE izipWithM #-}
zipWithM_
:: Monad m
=> (a -> b -> m c)
-> NonEmptyVector a
-> NonEmptyVector b
-> m ()
zipWithM_ :: forall (m :: * -> *) a b c.
Monad m =>
(a -> b -> m c) -> NonEmptyVector a -> NonEmptyVector b -> m ()
zipWithM_ a -> b -> m c
f NonEmptyVector a
a NonEmptyVector b
b = forall (m :: * -> *) a b c.
Monad m =>
(a -> b -> m c) -> Vector a -> Vector b -> m ()
V.zipWithM_ a -> b -> m c
f (forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a) (forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b)
{-# INLINE zipWithM_ #-}
izipWithM_
:: Monad m
=> (Int -> a -> b -> m c)
-> NonEmptyVector a
-> NonEmptyVector b
-> m ()
izipWithM_ :: forall (m :: * -> *) a b c.
Monad m =>
(Int -> a -> b -> m c)
-> NonEmptyVector a -> NonEmptyVector b -> m ()
izipWithM_ Int -> a -> b -> m c
f NonEmptyVector a
a NonEmptyVector b
b = forall (m :: * -> *) a b c.
Monad m =>
(Int -> a -> b -> m c) -> Vector a -> Vector b -> m ()
V.izipWithM_ Int -> a -> b -> m c
f (forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector a
a) (forall a. NonEmptyVector a -> Vector a
_neVec NonEmptyVector b
b)
{-# INLINE izipWithM_ #-}
unzip :: NonEmptyVector (a, b) -> (NonEmptyVector a, NonEmptyVector b)
unzip :: forall a b.
NonEmptyVector (a, b) -> (NonEmptyVector a, NonEmptyVector b)
unzip (NonEmptyVector Vector (a, b)
v) = case forall a b. Vector (a, b) -> (Vector a, Vector b)
V.unzip Vector (a, b)
v of
~(Vector a
a,Vector b
b) -> (forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector a
a, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector b
b)
{-# INLINE unzip #-}
unzip3
:: NonEmptyVector (a, b, c)
-> (NonEmptyVector a, NonEmptyVector b, NonEmptyVector c)
unzip3 :: forall a b c.
NonEmptyVector (a, b, c)
-> (NonEmptyVector a, NonEmptyVector b, NonEmptyVector c)
unzip3 (NonEmptyVector Vector (a, b, c)
v) = case forall a b c. Vector (a, b, c) -> (Vector a, Vector b, Vector c)
V.unzip3 Vector (a, b, c)
v of
~(Vector a
a,Vector b
b,Vector c
c) ->
( forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector a
a
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector b
b
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector c
c
)
{-# INLINE unzip3 #-}
unzip4
:: NonEmptyVector (a, b, c, d)
-> ( NonEmptyVector a
, NonEmptyVector b
, NonEmptyVector c
, NonEmptyVector d
)
unzip4 :: forall a b c d.
NonEmptyVector (a, b, c, d)
-> (NonEmptyVector a, NonEmptyVector b, NonEmptyVector c,
NonEmptyVector d)
unzip4 (NonEmptyVector Vector (a, b, c, d)
v) = case forall a b c d.
Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d)
V.unzip4 Vector (a, b, c, d)
v of
~(Vector a
a,Vector b
b,Vector c
c,Vector d
d) ->
( forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector a
a
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector b
b
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector c
c
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector d
d
)
{-# INLINE unzip4 #-}
unzip5
:: NonEmptyVector (a, b, c, d, e)
-> ( NonEmptyVector a
, NonEmptyVector b
, NonEmptyVector c
, NonEmptyVector d
, NonEmptyVector e
)
unzip5 :: forall a b c d e.
NonEmptyVector (a, b, c, d, e)
-> (NonEmptyVector a, NonEmptyVector b, NonEmptyVector c,
NonEmptyVector d, NonEmptyVector e)
unzip5 (NonEmptyVector Vector (a, b, c, d, e)
v) = case forall a b c d e.
Vector (a, b, c, d, e)
-> (Vector a, Vector b, Vector c, Vector d, Vector e)
V.unzip5 Vector (a, b, c, d, e)
v of
~(Vector a
a,Vector b
b,Vector c
c,Vector d
d,Vector e
e) ->
( forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector a
a
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector b
b
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector c
c
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector d
d
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector e
e
)
{-# INLINE unzip5 #-}
unzip6
:: NonEmptyVector (a, b, c, d, e, f)
-> ( NonEmptyVector a
, NonEmptyVector b
, NonEmptyVector c
, NonEmptyVector d
, NonEmptyVector e
, NonEmptyVector f
)
unzip6 :: forall a b c d e f.
NonEmptyVector (a, b, c, d, e, f)
-> (NonEmptyVector a, NonEmptyVector b, NonEmptyVector c,
NonEmptyVector d, NonEmptyVector e, NonEmptyVector f)
unzip6 (NonEmptyVector Vector (a, b, c, d, e, f)
v) = case forall a b c d e f.
Vector (a, b, c, d, e, f)
-> (Vector a, Vector b, Vector c, Vector d, Vector e, Vector f)
V.unzip6 Vector (a, b, c, d, e, f)
v of
~(Vector a
a,Vector b
b,Vector c
c,Vector d
d,Vector e
e,Vector f
f) ->
( forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector a
a
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector b
b
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector c
c
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector d
d
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector e
e
, forall a. Vector a -> NonEmptyVector a
NonEmptyVector Vector f
f
)
{-# INLINE unzip6 #-}
filter :: (a -> Bool) -> NonEmptyVector a -> Vector a
filter :: forall a. (a -> Bool) -> NonEmptyVector a -> Vector a
filter a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Vector a
V.filter a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE filter #-}
ifilter
:: (Int -> a -> Bool)
-> NonEmptyVector a
-> Vector a
ifilter :: forall a. (Int -> a -> Bool) -> NonEmptyVector a -> Vector a
ifilter Int -> a -> Bool
f = forall a. (Int -> a -> Bool) -> Vector a -> Vector a
V.ifilter Int -> a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifilter #-}
filterM
:: Monad m
=> (a -> m Bool)
-> NonEmptyVector a
-> m (Vector a)
filterM :: forall (m :: * -> *) a.
Monad m =>
(a -> m Bool) -> NonEmptyVector a -> m (Vector a)
filterM a -> m Bool
f = forall (m :: * -> *) a.
Monad m =>
(a -> m Bool) -> Vector a -> m (Vector a)
V.filterM a -> m Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE filterM #-}
ifilterM
:: Monad m
=> (Int -> a -> m Bool)
-> NonEmptyVector a
-> m (Vector a)
ifilterM :: forall (m :: * -> *) a.
Monad m =>
(Int -> a -> m Bool) -> NonEmptyVector a -> m (Vector a)
ifilterM Int -> a -> m Bool
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a b. (a -> b) -> Vector a -> Vector b
V.map forall a b. (a, b) -> b
snd)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) a.
Monad m =>
(a -> m Bool) -> Vector a -> m (Vector a)
V.filterM (forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry Int -> a -> m Bool
f)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Vector a -> Vector (Int, a)
V.indexed
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifilterM #-}
uniq :: Eq a => NonEmptyVector a -> NonEmptyVector a
uniq :: forall a. Eq a => NonEmptyVector a -> NonEmptyVector a
uniq = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Eq a => Vector a -> Vector a
V.uniq forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE uniq #-}
mapMaybe
:: (a -> Maybe b)
-> NonEmptyVector a
-> Vector b
mapMaybe :: forall a b. (a -> Maybe b) -> NonEmptyVector a -> Vector b
mapMaybe a -> Maybe b
f = forall a b. (a -> Maybe b) -> Vector a -> Vector b
V.mapMaybe a -> Maybe b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE mapMaybe #-}
imapMaybe
:: (Int -> a -> Maybe b)
-> NonEmptyVector a
-> Vector b
imapMaybe :: forall a b. (Int -> a -> Maybe b) -> NonEmptyVector a -> Vector b
imapMaybe Int -> a -> Maybe b
f = forall a b. (Int -> a -> Maybe b) -> Vector a -> Vector b
V.imapMaybe Int -> a -> Maybe b
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE imapMaybe #-}
takeWhile :: (a -> Bool) -> NonEmptyVector a -> Vector a
takeWhile :: forall a. (a -> Bool) -> NonEmptyVector a -> Vector a
takeWhile a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Vector a
V.takeWhile a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE takeWhile #-}
dropWhile :: (a -> Bool) -> NonEmptyVector a -> Vector a
dropWhile :: forall a. (a -> Bool) -> NonEmptyVector a -> Vector a
dropWhile a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Vector a
V.dropWhile a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE dropWhile #-}
partition :: (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
partition :: forall a. (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
partition a -> Bool
f = forall a. (a -> Bool) -> Vector a -> (Vector a, Vector a)
V.partition a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE partition #-}
partitionWith :: (a -> Either b c) -> NonEmptyVector a -> (Vector b, Vector c)
partitionWith :: forall a b c.
(a -> Either b c) -> NonEmptyVector a -> (Vector b, Vector c)
partitionWith a -> Either b c
f = forall a b c. (a -> Either b c) -> Vector a -> (Vector b, Vector c)
V.partitionWith a -> Either b c
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE partitionWith #-}
unstablePartition
:: (a -> Bool)
-> NonEmptyVector a
-> (Vector a, Vector a)
unstablePartition :: forall a. (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
unstablePartition a -> Bool
f = forall a. (a -> Bool) -> Vector a -> (Vector a, Vector a)
V.unstablePartition a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE unstablePartition #-}
span :: (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
span :: forall a. (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
span a -> Bool
f = forall a. (a -> Bool) -> Vector a -> (Vector a, Vector a)
V.span a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE span #-}
break :: (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
break :: forall a. (a -> Bool) -> NonEmptyVector a -> (Vector a, Vector a)
break a -> Bool
f = forall a. (a -> Bool) -> Vector a -> (Vector a, Vector a)
V.break a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE break #-}
elem :: Eq a => a -> NonEmptyVector a -> Bool
elem :: forall a. Eq a => a -> NonEmptyVector a -> Bool
elem a
a = forall a. Eq a => a -> Vector a -> Bool
V.elem a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE elem #-}
notElem :: Eq a => a -> NonEmptyVector a -> Bool
notElem :: forall a. Eq a => a -> NonEmptyVector a -> Bool
notElem a
a = forall a. Eq a => a -> Vector a -> Bool
V.notElem a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE notElem #-}
find :: (a -> Bool) -> NonEmptyVector a -> Maybe a
find :: forall a. (a -> Bool) -> NonEmptyVector a -> Maybe a
find a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Maybe a
V.find a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE find #-}
findIndex :: (a -> Bool) -> NonEmptyVector a -> Maybe Int
findIndex :: forall a. (a -> Bool) -> NonEmptyVector a -> Maybe Int
findIndex a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Maybe Int
V.findIndex a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE findIndex #-}
findIndices :: (a -> Bool) -> NonEmptyVector a -> Vector Int
findIndices :: forall a. (a -> Bool) -> NonEmptyVector a -> Vector Int
findIndices a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Vector Int
V.findIndices a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE findIndices #-}
elemIndex :: Eq a => a -> NonEmptyVector a -> Maybe Int
elemIndex :: forall a. Eq a => a -> NonEmptyVector a -> Maybe Int
elemIndex a
a = forall a. Eq a => a -> Vector a -> Maybe Int
V.elemIndex a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE elemIndex #-}
elemIndices :: Eq a => a -> NonEmptyVector a -> Vector Int
elemIndices :: forall a. Eq a => a -> NonEmptyVector a -> Vector Int
elemIndices a
a = forall a. Eq a => a -> Vector a -> Vector Int
V.elemIndices a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE elemIndices #-}
foldl :: (a -> b -> a) -> a -> NonEmptyVector b -> a
foldl :: forall a b. (a -> b -> a) -> a -> NonEmptyVector b -> a
foldl a -> b -> a
f a
a = forall a b. (a -> b -> a) -> a -> Vector b -> a
V.foldl a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldl #-}
foldl1 :: (a -> a -> a) -> NonEmptyVector a -> a
foldl1 :: forall a. (a -> a -> a) -> NonEmptyVector a -> a
foldl1 a -> a -> a
f = forall a. (a -> a -> a) -> Vector a -> a
V.foldl1 a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldl1 #-}
foldl' :: (a -> b -> a) -> a -> NonEmptyVector b -> a
foldl' :: forall a b. (a -> b -> a) -> a -> NonEmptyVector b -> a
foldl' a -> b -> a
f a
a = forall a b. (a -> b -> a) -> a -> Vector b -> a
V.foldl' a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldl' #-}
foldl1' :: (a -> a -> a) -> NonEmptyVector a -> a
foldl1' :: forall a. (a -> a -> a) -> NonEmptyVector a -> a
foldl1' a -> a -> a
f = forall a. (a -> a -> a) -> Vector a -> a
V.foldl1' a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldl1' #-}
foldr :: (a -> b -> b) -> b -> NonEmptyVector a -> b
foldr :: forall a b. (a -> b -> b) -> b -> NonEmptyVector a -> b
foldr a -> b -> b
f b
b = forall a b. (a -> b -> b) -> b -> Vector a -> b
V.foldr a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldr #-}
foldr1 :: (a -> a -> a) -> NonEmptyVector a -> a
foldr1 :: forall a. (a -> a -> a) -> NonEmptyVector a -> a
foldr1 a -> a -> a
f = forall a. (a -> a -> a) -> Vector a -> a
V.foldr1 a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldr1 #-}
foldr' :: (a -> b -> b) -> b -> NonEmptyVector a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> NonEmptyVector a -> b
foldr' a -> b -> b
f b
b = forall a b. (a -> b -> b) -> b -> Vector a -> b
V.foldr' a -> b -> b
f b
bforall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldr' #-}
foldr1' :: (a -> a -> a) -> NonEmptyVector a -> a
foldr1' :: forall a. (a -> a -> a) -> NonEmptyVector a -> a
foldr1' a -> a -> a
f = forall a. (a -> a -> a) -> Vector a -> a
V.foldr1' a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldr1' #-}
ifoldl :: (a -> Int -> b -> a) -> a -> NonEmptyVector b -> a
ifoldl :: forall a b. (a -> Int -> b -> a) -> a -> NonEmptyVector b -> a
ifoldl a -> Int -> b -> a
f a
a = forall a b. (a -> Int -> b -> a) -> a -> Vector b -> a
V.ifoldl a -> Int -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldl #-}
ifoldl' :: (a -> Int -> b -> a) -> a -> NonEmptyVector b -> a
ifoldl' :: forall a b. (a -> Int -> b -> a) -> a -> NonEmptyVector b -> a
ifoldl' a -> Int -> b -> a
f a
a = forall a b. (a -> Int -> b -> a) -> a -> Vector b -> a
V.ifoldl' a -> Int -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldl' #-}
ifoldr :: (Int -> a -> b -> b) -> b -> NonEmptyVector a -> b
ifoldr :: forall a b. (Int -> a -> b -> b) -> b -> NonEmptyVector a -> b
ifoldr Int -> a -> b -> b
f b
b = forall a b. (Int -> a -> b -> b) -> b -> Vector a -> b
V.ifoldr Int -> a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldr #-}
ifoldr' :: (Int -> a -> b -> b) -> b -> NonEmptyVector a -> b
ifoldr' :: forall a b. (Int -> a -> b -> b) -> b -> NonEmptyVector a -> b
ifoldr' Int -> a -> b -> b
f b
b = forall a b. (Int -> a -> b -> b) -> b -> Vector a -> b
V.ifoldr' Int -> a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldr' #-}
all :: (a -> Bool) -> NonEmptyVector a -> Bool
all :: forall a. (a -> Bool) -> NonEmptyVector a -> Bool
all a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Bool
V.all a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE all #-}
any :: (a -> Bool) -> NonEmptyVector a -> Bool
any :: forall a. (a -> Bool) -> NonEmptyVector a -> Bool
any a -> Bool
f = forall a. (a -> Bool) -> Vector a -> Bool
V.any a -> Bool
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE any #-}
and :: NonEmptyVector Bool -> Bool
and :: NonEmptyVector Bool -> Bool
and = Vector Bool -> Bool
V.and forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE and #-}
or :: NonEmptyVector Bool -> Bool
or :: NonEmptyVector Bool -> Bool
or = Vector Bool -> Bool
V.or forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE or #-}
sum :: Num a => NonEmptyVector a -> a
sum :: forall a. Num a => NonEmptyVector a -> a
sum = forall a. Num a => Vector a -> a
V.sum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE sum #-}
product :: Num a => NonEmptyVector a -> a
product :: forall a. Num a => NonEmptyVector a -> a
product = forall a. Num a => Vector a -> a
V.product forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE product #-}
maximum :: Ord a => NonEmptyVector a -> a
maximum :: forall a. Ord a => NonEmptyVector a -> a
maximum = forall a. Ord a => Vector a -> a
V.maximum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE maximum #-}
maximumBy :: (a -> a -> Ordering) -> NonEmptyVector a -> a
maximumBy :: forall a. (a -> a -> Ordering) -> NonEmptyVector a -> a
maximumBy a -> a -> Ordering
f = forall a. (a -> a -> Ordering) -> Vector a -> a
V.maximumBy a -> a -> Ordering
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE maximumBy #-}
minimum :: Ord a => NonEmptyVector a -> a
minimum :: forall a. Ord a => NonEmptyVector a -> a
minimum = forall a. Ord a => Vector a -> a
V.minimum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE minimum #-}
minimumBy :: (a -> a -> Ordering) -> NonEmptyVector a -> a
minimumBy :: forall a. (a -> a -> Ordering) -> NonEmptyVector a -> a
minimumBy a -> a -> Ordering
f = forall a. (a -> a -> Ordering) -> Vector a -> a
V.minimumBy a -> a -> Ordering
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE minimumBy #-}
minIndex :: Ord a => NonEmptyVector a -> Int
minIndex :: forall a. Ord a => NonEmptyVector a -> Int
minIndex = forall a. Ord a => Vector a -> Int
V.minIndex forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE minIndex #-}
minIndexBy :: (a -> a -> Ordering) -> NonEmptyVector a -> Int
minIndexBy :: forall a. (a -> a -> Ordering) -> NonEmptyVector a -> Int
minIndexBy a -> a -> Ordering
f = forall a. (a -> a -> Ordering) -> Vector a -> Int
V.minIndexBy a -> a -> Ordering
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE minIndexBy #-}
maxIndex :: Ord a => NonEmptyVector a -> Int
maxIndex :: forall a. Ord a => NonEmptyVector a -> Int
maxIndex = forall a. Ord a => Vector a -> Int
V.maxIndex forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE maxIndex #-}
maxIndexBy :: (a -> a -> Ordering) -> NonEmptyVector a -> Int
maxIndexBy :: forall a. (a -> a -> Ordering) -> NonEmptyVector a -> Int
maxIndexBy a -> a -> Ordering
f = forall a. (a -> a -> Ordering) -> Vector a -> Int
V.maxIndexBy a -> a -> Ordering
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE maxIndexBy #-}
foldM :: Monad m => (a -> b -> m a) -> a -> NonEmptyVector b -> m a
foldM :: forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> NonEmptyVector b -> m a
foldM a -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> Vector b -> m a
V.foldM a -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldM #-}
ifoldM :: Monad m => (a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m a
ifoldM :: forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m a
ifoldM a -> Int -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> Vector b -> m a
V.ifoldM a -> Int -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldM #-}
foldM' :: Monad m => (a -> b -> m a) -> a -> NonEmptyVector b -> m a
foldM' :: forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> NonEmptyVector b -> m a
foldM' a -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> Vector b -> m a
V.foldM' a -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldM' #-}
ifoldM' :: Monad m => (a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m a
ifoldM' :: forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m a
ifoldM' a -> Int -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> Vector b -> m a
V.ifoldM' a -> Int -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldM' #-}
fold1M :: Monad m => (a -> a -> m a) -> NonEmptyVector a -> m a
fold1M :: forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> NonEmptyVector a -> m a
fold1M a -> a -> m a
f = forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> Vector a -> m a
V.fold1M a -> a -> m a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE fold1M #-}
fold1M' :: Monad m => (a -> a -> m a) -> NonEmptyVector a -> m a
fold1M' :: forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> NonEmptyVector a -> m a
fold1M' a -> a -> m a
f = forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> Vector a -> m a
V.fold1M' a -> a -> m a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE fold1M' #-}
foldM_ :: Monad m => (a -> b -> m a) -> a -> NonEmptyVector b -> m ()
foldM_ :: forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> NonEmptyVector b -> m ()
foldM_ a -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> Vector b -> m ()
V.foldM_ a -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldM_ #-}
ifoldM_ :: Monad m => (a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m ()
ifoldM_ :: forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m ()
ifoldM_ a -> Int -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> Vector b -> m ()
V.ifoldM_ a -> Int -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldM_ #-}
foldM'_ :: Monad m => (a -> b -> m a) -> a -> NonEmptyVector b -> m ()
foldM'_ :: forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> NonEmptyVector b -> m ()
foldM'_ a -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> b -> m a) -> a -> Vector b -> m ()
V.foldM'_ a -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE foldM'_ #-}
ifoldM'_ :: Monad m => (a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m ()
ifoldM'_ :: forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> NonEmptyVector b -> m ()
ifoldM'_ a -> Int -> b -> m a
f a
a = forall (m :: * -> *) a b.
Monad m =>
(a -> Int -> b -> m a) -> a -> Vector b -> m ()
V.ifoldM'_ a -> Int -> b -> m a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE ifoldM'_ #-}
fold1M_ :: Monad m => (a -> a -> m a) -> NonEmptyVector a -> m ()
fold1M_ :: forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> NonEmptyVector a -> m ()
fold1M_ a -> a -> m a
f = forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> Vector a -> m ()
V.fold1M_ a -> a -> m a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE fold1M_ #-}
fold1M'_ :: Monad m => (a -> a -> m a) -> NonEmptyVector a -> m ()
fold1M'_ :: forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> NonEmptyVector a -> m ()
fold1M'_ a -> a -> m a
f = forall (m :: * -> *) a.
Monad m =>
(a -> a -> m a) -> Vector a -> m ()
V.fold1M'_ a -> a -> m a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE fold1M'_ #-}
sequence :: Monad m => NonEmptyVector (m a) -> m (NonEmptyVector a)
sequence :: forall (m :: * -> *) a.
Monad m =>
NonEmptyVector (m a) -> m (NonEmptyVector a)
sequence = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) a. Monad m => Vector (m a) -> m (Vector a)
V.sequence forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE sequence #-}
sequence_ :: Monad m => NonEmptyVector (m a) -> m ()
sequence_ :: forall (m :: * -> *) a. Monad m => NonEmptyVector (m a) -> m ()
sequence_ = forall (m :: * -> *) a. Monad m => Vector (m a) -> m ()
V.sequence_ forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE sequence_ #-}
prescanl :: (a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
prescanl :: forall a b.
(a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
prescanl a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> a) -> a -> Vector b -> Vector a
V.prescanl a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE prescanl #-}
prescanl' :: (a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
prescanl' :: forall a b.
(a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
prescanl' a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> a) -> a -> Vector b -> Vector a
V.prescanl' a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE prescanl' #-}
postscanl :: (a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
postscanl :: forall a b.
(a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
postscanl a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> a) -> a -> Vector b -> Vector a
V.postscanl a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE postscanl #-}
postscanl' :: (a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
postscanl' :: forall a b.
(a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
postscanl' a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> a) -> a -> Vector b -> Vector a
V.postscanl' a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE postscanl' #-}
scanl :: (a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
scanl :: forall a b.
(a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
scanl a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> a) -> a -> Vector b -> Vector a
V.scanl a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanl #-}
scanl' :: (a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
scanl' :: forall a b.
(a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
scanl' a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> a) -> a -> Vector b -> Vector a
V.scanl' a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanl' #-}
scanl1 :: (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanl1 :: forall a. (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanl1 a -> a -> a
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (a -> a -> a) -> Vector a -> Vector a
V.scanl1 a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanl1 #-}
scanl1' :: (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanl1' :: forall a. (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanl1' a -> a -> a
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (a -> a -> a) -> Vector a -> Vector a
V.scanl1' a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanl1' #-}
iscanl :: (Int -> a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
iscanl :: forall a b.
(Int -> a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
iscanl Int -> a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Int -> a -> b -> a) -> a -> Vector b -> Vector a
V.iscanl Int -> a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE iscanl #-}
iscanl' :: (Int -> a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
iscanl' :: forall a b.
(Int -> a -> b -> a) -> a -> NonEmptyVector b -> NonEmptyVector a
iscanl' Int -> a -> b -> a
f a
a = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Int -> a -> b -> a) -> a -> Vector b -> Vector a
V.iscanl' Int -> a -> b -> a
f a
a forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE iscanl' #-}
prescanr :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
prescanr :: forall a b.
(a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
prescanr a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> b) -> b -> Vector a -> Vector b
V.prescanr a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE prescanr #-}
prescanr' :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
prescanr' :: forall a b.
(a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
prescanr' a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> b) -> b -> Vector a -> Vector b
V.prescanr' a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE prescanr' #-}
postscanr :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
postscanr :: forall a b.
(a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
postscanr a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> b) -> b -> Vector a -> Vector b
V.postscanr a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE postscanr #-}
postscanr' :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
postscanr' :: forall a b.
(a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
postscanr' a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> b) -> b -> Vector a -> Vector b
V.postscanr' a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE postscanr' #-}
scanr :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
scanr :: forall a b.
(a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
scanr a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> b) -> b -> Vector a -> Vector b
V.scanr a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanr #-}
scanr' :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
scanr' :: forall a b.
(a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
scanr' a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b -> b) -> b -> Vector a -> Vector b
V.scanr' a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanr' #-}
scanr1 :: (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanr1 :: forall a. (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanr1 a -> a -> a
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (a -> a -> a) -> Vector a -> Vector a
V.scanr1 a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanr1 #-}
scanr1' :: (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanr1' :: forall a. (a -> a -> a) -> NonEmptyVector a -> NonEmptyVector a
scanr1' a -> a -> a
f = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (a -> a -> a) -> Vector a -> Vector a
V.scanr1' a -> a -> a
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE scanr1' #-}
iscanr :: (Int -> a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
iscanr :: forall a b.
(Int -> a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
iscanr Int -> a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Int -> a -> b -> b) -> b -> Vector a -> Vector b
V.iscanr Int -> a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE iscanr #-}
iscanr' :: (Int -> a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
iscanr' :: forall a b.
(Int -> a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b
iscanr' Int -> a -> b -> b
f b
b = forall a. Vector a -> NonEmptyVector a
NonEmptyVector forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Int -> a -> b -> b) -> b -> Vector a -> Vector b
V.iscanr' Int -> a -> b -> b
f b
b forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. NonEmptyVector a -> Vector a
_neVec
{-# INLINE iscanr' #-}