Module

Data.NonEmpty.Indexed

Package
purescript-indexed-nonempty
Repository
colehaus/purescript-indexed-nonempty

#NonEmpty Source

data NonEmpty f k v

Constructors

Instances

#(:|) Source

Operator alias for Data.NonEmpty.Indexed.NonEmpty (right-associative / precedence 5)

#foldl1 Source

foldl1 :: forall f k v. Foldable (f k) => (v -> v -> v) -> NonEmpty f k v -> v

#fromNonEmpty Source

fromNonEmpty :: forall f k v r. (k -> v -> f k v -> r) -> NonEmpty f k v -> r

#nonEmpty Source

nonEmpty :: forall f k v. (f k v -> Maybe (Tuple (Tuple k v) (f k v))) -> f k v -> Maybe (NonEmpty f k v)

#head Source

head :: forall f k v. NonEmpty f k v -> Tuple k v

#tail Source

tail :: forall f k v. NonEmpty f k v -> f k v

#hmap Source

hmap :: forall f g k. ((f k) ~> (g k)) -> (NonEmpty f k) ~> (NonEmpty g k)

#deindex Source

deindex :: forall f g k v u. (Tuple k v -> u) -> (f k v -> g u) -> NonEmpty f k v -> NonEmpty g u

#reindex Source

reindex :: forall j k f v. (k -> j) -> (f k v -> f j v) -> NonEmpty f k v -> NonEmpty f j v

#index Source

index :: forall f g u k v. (u -> Tuple k v) -> (g u -> f k v) -> NonEmpty g u -> NonEmpty f k v

#foldMapWithIndex1 Source

foldMapWithIndex1 :: forall f k v s. FoldableWithIndex k (f k) => Semigroup s => (k -> v -> s) -> NonEmpty f k v -> s