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 v k f. Foldable (f k) => (v -> v -> v) -> NonEmpty f k v -> v

#fromNonEmpty Source

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

#nonEmpty Source

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

#head Source

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

#tail Source

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

#hmap Source

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

#deindex Source

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

#reindex Source

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

#index Source

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

#foldMapWithIndex1 Source

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