Module

Data.Array.NonEmpty

#fromArray

fromArray :: forall a. Array a -> Maybe (NonEmptyArray a)

#fromNonEmpty

#toArray

toArray :: forall a. NonEmptyArray a -> Array a

#toNonEmpty

#fromFoldable

fromFoldable :: forall f a. Foldable f => f a -> Maybe (NonEmptyArray a)

#fromFoldable1

fromFoldable1 :: forall f a. Foldable1 f => f a -> NonEmptyArray a

#toUnfoldable

toUnfoldable :: forall f a. Unfoldable f => NonEmptyArray a -> f a

#toUnfoldable1

toUnfoldable1 :: forall f a. Unfoldable1 f => NonEmptyArray a -> f a

#singleton

singleton :: forall a. a -> NonEmptyArray a

#(..)

Operator alias for Data.Array.NonEmpty.range (non-associative / precedence 8)

#range

#replicate

replicate :: forall a. Int -> a -> NonEmptyArray a

Replicate an item at least once

#some

some :: forall f a. Alternative f => Lazy (f (Array a)) => f a -> f (NonEmptyArray a)

#length

length :: forall a. NonEmptyArray a -> Int

#(:)

Operator alias for Data.Array.NonEmpty.cons (right-associative / precedence 6)

#cons

cons :: forall a. a -> NonEmptyArray a -> NonEmptyArray a

#cons'

cons' :: forall a. a -> Array a -> NonEmptyArray a

#snoc

snoc :: forall a. NonEmptyArray a -> a -> NonEmptyArray a

#snoc'

snoc' :: forall a. Array a -> a -> NonEmptyArray a

#appendArray

appendArray :: forall a. NonEmptyArray a -> Array a -> NonEmptyArray a

#insert

insert :: forall a. Ord a => a -> NonEmptyArray a -> NonEmptyArray a

#insertBy

insertBy :: forall a. (a -> a -> Ordering) -> a -> NonEmptyArray a -> NonEmptyArray a

#head

head :: forall a. NonEmptyArray a -> a

#last

last :: forall a. NonEmptyArray a -> a

#tail

tail :: forall a. NonEmptyArray a -> Array a

#init

init :: forall a. NonEmptyArray a -> Array a

#uncons

uncons :: forall a. NonEmptyArray a -> { head :: a, tail :: Array a }

#unsnoc

unsnoc :: forall a. NonEmptyArray a -> { init :: Array a, last :: a }

#(!!)

Operator alias for Data.Array.NonEmpty.index (left-associative / precedence 8)

#index

index :: forall a. NonEmptyArray a -> Int -> Maybe a

#elemIndex

elemIndex :: forall a. Eq a => a -> NonEmptyArray a -> Maybe Int

#elemLastIndex

elemLastIndex :: forall a. Eq a => a -> NonEmptyArray a -> Maybe Int

#findIndex

findIndex :: forall a. (a -> Boolean) -> NonEmptyArray a -> Maybe Int

#findLastIndex

findLastIndex :: forall a. (a -> Boolean) -> NonEmptyArray a -> Maybe Int

#insertAt

insertAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)

#deleteAt

deleteAt :: forall a. Int -> NonEmptyArray a -> Maybe (Array a)

#updateAt

updateAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)

#updateAtIndices

updateAtIndices :: forall t a. Foldable t => t (Tuple Int a) -> NonEmptyArray a -> NonEmptyArray a

#modifyAt

modifyAt :: forall a. Int -> (a -> a) -> NonEmptyArray a -> Maybe (NonEmptyArray a)

#modifyAtIndices

modifyAtIndices :: forall t a. Foldable t => t Int -> (a -> a) -> NonEmptyArray a -> NonEmptyArray a

#alterAt

alterAt :: forall a. Int -> (a -> Maybe a) -> NonEmptyArray a -> Maybe (Array a)

#reverse

reverse :: forall a. NonEmptyArray a -> NonEmptyArray a

#concat

#concatMap

concatMap :: forall a b. (a -> NonEmptyArray b) -> NonEmptyArray a -> NonEmptyArray b

#filter

filter :: forall a. (a -> Boolean) -> NonEmptyArray a -> Array a

#partition

partition :: forall a. (a -> Boolean) -> NonEmptyArray a -> { no :: Array a, yes :: Array a }

#filterA

filterA :: forall a f. Applicative f => (a -> f Boolean) -> NonEmptyArray a -> f (Array a)

#mapMaybe

mapMaybe :: forall a b. (a -> Maybe b) -> NonEmptyArray a -> Array b

#catMaybes

catMaybes :: forall a. NonEmptyArray (Maybe a) -> Array a

#sort

sort :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a

#sortBy

sortBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a

#sortWith

sortWith :: forall a b. Ord b => (a -> b) -> NonEmptyArray a -> NonEmptyArray a

#slice

slice :: forall a. Int -> Int -> NonEmptyArray a -> Array a

#take

take :: forall a. Int -> NonEmptyArray a -> Array a

#takeEnd

takeEnd :: forall a. Int -> NonEmptyArray a -> Array a

#takeWhile

takeWhile :: forall a. (a -> Boolean) -> NonEmptyArray a -> Array a

#drop

drop :: forall a. Int -> NonEmptyArray a -> Array a

#dropEnd

dropEnd :: forall a. Int -> NonEmptyArray a -> Array a

#dropWhile

dropWhile :: forall a. (a -> Boolean) -> NonEmptyArray a -> Array a

#span

span :: forall a. (a -> Boolean) -> NonEmptyArray a -> { init :: Array a, rest :: Array a }

#nub

nub :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a

#nubBy

nubBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a

#nubEq

nubEq :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a

#nubByEq

nubByEq :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a

#union

union :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> NonEmptyArray a

#union'

union' :: forall a. Eq a => NonEmptyArray a -> Array a -> NonEmptyArray a

#unionBy

unionBy :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a -> NonEmptyArray a

#unionBy'

unionBy' :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> Array a -> NonEmptyArray a

#delete

delete :: forall a. Eq a => a -> NonEmptyArray a -> Array a

#deleteBy

deleteBy :: forall a. (a -> a -> Boolean) -> a -> NonEmptyArray a -> Array a

#(\\)

Operator alias for Data.Array.NonEmpty.difference (non-associative / precedence 5)

#difference

difference :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> Array a

#difference'

difference' :: forall a. Eq a => NonEmptyArray a -> Array a -> Array a

#intersect

intersect :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> Array a

#intersect'

intersect' :: forall a. Eq a => NonEmptyArray a -> Array a -> Array a

#intersectBy

intersectBy :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a -> Array a

#intersectBy'

intersectBy' :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> Array a -> Array a

#zipWith

zipWith :: forall a b c. (a -> b -> c) -> NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray c

#zipWithA

zipWithA :: forall m a b c. Applicative m => (a -> b -> m c) -> NonEmptyArray a -> NonEmptyArray b -> m (NonEmptyArray c)

#zip

zip :: forall a b. NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray (Tuple a b)

#unzip

unzip :: forall a b. NonEmptyArray (Tuple a b) -> Tuple (NonEmptyArray a) (NonEmptyArray b)

#foldM

foldM :: forall m a b. Monad m => (a -> b -> m a) -> a -> NonEmptyArray b -> m a

#foldRecM

foldRecM :: forall m a b. MonadRec m => (a -> b -> m a) -> a -> NonEmptyArray b -> m a

#unsafeIndex

unsafeIndex :: forall a. Partial => NonEmptyArray a -> Int -> a

Re-exports from Data.Array.NonEmpty.Internal

Modules