Module
Data.Array.NonEmpty
- Package
- purescript-arrays
- Repository
- purescript/purescript-arrays
#fromNonEmpty Source
fromNonEmpty :: forall a. NonEmpty Array a -> NonEmptyArray a
#toArray Source
toArray :: forall a. NonEmptyArray a -> Array a
#toNonEmpty Source
toNonEmpty :: forall a. NonEmptyArray a -> NonEmpty Array a
#fromFoldable Source
fromFoldable :: forall a f. Foldable f => f a -> Maybe (NonEmptyArray a)
#fromFoldable1 Source
fromFoldable1 :: forall a f. Foldable1 f => f a -> NonEmptyArray a
#toUnfoldable Source
toUnfoldable :: forall a f. Unfoldable f => NonEmptyArray a -> f a
#toUnfoldable1 Source
toUnfoldable1 :: forall a f. Unfoldable1 f => NonEmptyArray a -> f a
#singleton Source
singleton :: forall a. a -> NonEmptyArray a
#replicate Source
replicate :: forall a. Int -> a -> NonEmptyArray a
Replicate an item at least once
#some Source
some :: forall a f. Alternative f => Lazy (f (Array a)) => f a -> f (NonEmptyArray a)
#length Source
length :: forall a. NonEmptyArray a -> Int
#cons Source
cons :: forall a. a -> NonEmptyArray a -> NonEmptyArray a
#cons' Source
cons' :: forall a. a -> Array a -> NonEmptyArray a
#snoc Source
snoc :: forall a. NonEmptyArray a -> a -> NonEmptyArray a
#snoc' Source
snoc' :: forall a. Array a -> a -> NonEmptyArray a
#appendArray Source
appendArray :: forall a. NonEmptyArray a -> Array a -> NonEmptyArray a
#insert Source
insert :: forall a. Ord a => a -> NonEmptyArray a -> NonEmptyArray a
#insertBy Source
insertBy :: forall a. (a -> a -> Ordering) -> a -> NonEmptyArray a -> NonEmptyArray a
#head Source
head :: forall a. NonEmptyArray a -> a
#last Source
last :: forall a. NonEmptyArray a -> a
#tail Source
tail :: forall a. NonEmptyArray a -> Array a
#init Source
init :: forall a. NonEmptyArray a -> Array a
#uncons Source
uncons :: forall a. NonEmptyArray a -> { head :: a, tail :: Array a }
#unsnoc Source
unsnoc :: forall a. NonEmptyArray a -> { init :: Array a, last :: a }
#elemLastIndex Source
elemLastIndex :: forall a. Eq a => a -> NonEmptyArray a -> Maybe Int
#findLastIndex Source
findLastIndex :: forall a. (a -> Boolean) -> NonEmptyArray a -> Maybe Int
#insertAt Source
insertAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)
#updateAt Source
updateAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)
#updateAtIndices Source
updateAtIndices :: forall a t. Foldable t => t (Tuple Int a) -> NonEmptyArray a -> NonEmptyArray a
#modifyAt Source
modifyAt :: forall a. Int -> (a -> a) -> NonEmptyArray a -> Maybe (NonEmptyArray a)
#modifyAtIndices Source
modifyAtIndices :: forall a t. Foldable t => t Int -> (a -> a) -> NonEmptyArray a -> NonEmptyArray a
#reverse Source
reverse :: forall a. NonEmptyArray a -> NonEmptyArray a
#concat Source
concat :: forall a. NonEmptyArray (NonEmptyArray a) -> NonEmptyArray a
#concatMap Source
concatMap :: forall b a. (a -> NonEmptyArray b) -> NonEmptyArray a -> NonEmptyArray b
#partition Source
partition :: forall a. (a -> Boolean) -> NonEmptyArray a -> { no :: Array a, yes :: Array a }
#filterA Source
filterA :: forall f a. Applicative f => (a -> f Boolean) -> NonEmptyArray a -> f (Array a)
#sort Source
sort :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a
#sortBy Source
sortBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a
#sortWith Source
sortWith :: forall b a. Ord b => (a -> b) -> NonEmptyArray a -> NonEmptyArray a
#span Source
span :: forall a. (a -> Boolean) -> NonEmptyArray a -> { init :: Array a, rest :: Array a }
#nub Source
nub :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a
#nubBy Source
nubBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a
#nubEq Source
nubEq :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a
#nubByEq Source
nubByEq :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a
#union Source
union :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> NonEmptyArray a
#union' Source
union' :: forall a. Eq a => NonEmptyArray a -> Array a -> NonEmptyArray a
#unionBy Source
unionBy :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a -> NonEmptyArray a
#unionBy' Source
unionBy' :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> Array a -> NonEmptyArray a
#difference Source
difference :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> Array a
#difference' Source
difference' :: forall a. Eq a => NonEmptyArray a -> Array a -> Array a
#intersect Source
intersect :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> Array a
#intersect' Source
intersect' :: forall a. Eq a => NonEmptyArray a -> Array a -> Array a
#intersectBy Source
intersectBy :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a -> Array a
#intersectBy' Source
intersectBy' :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> Array a -> Array a
#zipWith Source
zipWith :: forall c b a. (a -> b -> c) -> NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray c
#zipWithA Source
zipWithA :: forall c b a m. Applicative m => (a -> b -> m c) -> NonEmptyArray a -> NonEmptyArray b -> m (NonEmptyArray c)
#zip Source
zip :: forall b a. NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray (Tuple a b)
#unzip Source
unzip :: forall b a. NonEmptyArray (Tuple a b) -> Tuple (NonEmptyArray a) (NonEmptyArray b)
#foldM Source
foldM :: forall b a m. Monad m => (a -> b -> m a) -> a -> NonEmptyArray b -> m a
#foldRecM Source
foldRecM :: forall b a m. MonadRec m => (a -> b -> m a) -> a -> NonEmptyArray b -> m a
#unsafeIndex Source
unsafeIndex :: forall a. Partial => NonEmptyArray a -> Int -> a
Re-exports from Data.Array.NonEmpty.Internal
#NonEmptyArray Source
newtype NonEmptyArray a
Instances
(Show a) => Show (NonEmptyArray a)
(Eq a) => Eq (NonEmptyArray a)
Eq1 NonEmptyArray
(Ord a) => Ord (NonEmptyArray a)
Ord1 NonEmptyArray
Semigroup (NonEmptyArray a)
Functor NonEmptyArray
FunctorWithIndex Int NonEmptyArray
Foldable NonEmptyArray
FoldableWithIndex Int NonEmptyArray
Foldable1 NonEmptyArray
Unfoldable1 NonEmptyArray
Traversable NonEmptyArray
TraversableWithIndex Int NonEmptyArray
Traversable1 NonEmptyArray
Apply NonEmptyArray
Applicative NonEmptyArray
Bind NonEmptyArray
Monad NonEmptyArray
Alt NonEmptyArray