Awesome
Module Data.Array.NonEmpty
NonEmpty
data NonEmpty a
= NonEmpty a (Array a)
Instances
instance showNonEmpty :: (Show a) => Show (NonEmpty a)
instance eqNonEmpty :: (Eq a) => Eq (NonEmpty a)
instance functorNonEmpty :: Functor NonEmpty
instance applyNonEmpty :: Apply NonEmpty
instance applicativeNonEmpty :: Applicative NonEmpty
instance bindNonEmpty :: Bind NonEmpty
instance monadNonEmpty :: Monad NonEmpty
instance semigroupNonEmpty :: Semigroup (NonEmpty a)
instance foldableNonEmpty :: Foldable NonEmpty
instance traversableNonEmpty :: Traversable NonEmpty
(:|)
(:|) :: forall a. a -> Array a -> NonEmpty a
non-associative / precedence 5
toArray
toArray :: forall a. NonEmpty a -> Array a
length
length :: forall a. NonEmpty a -> Int
head
head :: forall a. NonEmpty a -> a
tail
tail :: forall a. NonEmpty a -> Array a
last
last :: forall a. NonEmpty a -> a
push
push :: forall a. a -> NonEmpty a -> NonEmpty a
pop
pop :: forall a. NonEmpty a -> Array a
(<|)
(<|) :: forall a. a -> NonEmpty a -> NonEmpty a
left-associative / precedence -1
take
take :: forall a. Int -> NonEmpty a -> Array a
drop
drop :: forall a. Int -> NonEmpty a -> Array a
filter
filter :: forall a. (a -> Boolean) -> NonEmpty a -> Array a
singleton
singleton :: forall a. a -> NonEmpty a
nub
nub :: forall a. (Eq a) => NonEmpty a -> NonEmpty a
nubBy
nubBy :: forall a. (a -> a -> Boolean) -> NonEmpty a -> NonEmpty a
concatMap
concatMap :: forall a b. (a -> NonEmpty b) -> NonEmpty a -> NonEmpty b
(!!)
(!!) :: forall a. NonEmpty a -> Int -> Maybe a
left-associative / precedence 8
reverse
reverse :: forall a. NonEmpty a -> NonEmpty a
reducer
reducer :: forall a. (a -> a -> a) -> NonEmpty a -> a
reducel
reducel :: forall a. (a -> a -> a) -> NonEmpty a -> a
sconcat
sconcat :: forall a. (Semigroup a) => NonEmpty a -> a