Module

Data.SelectionFoldable

See the SelectionFoldableWithData module docs for function comments, as all of the functions in this module are convenience aliases for the ones in that module (for the case where there is no data).

#SelectionFoldable

type SelectionFoldable f a = SelectionFoldableWithData f Unit a

A Foldable where at most one item is selected. This is an alias for a SelectionFoldableWithData that has no associated data.

  • f is the type of the Foldable that will contain the items.
  • a is the type of the items.

#fromFoldable

fromFoldable :: forall f a. Foldable f => f a -> SelectionFoldable f a

#toFoldable

toFoldable :: forall f a. Foldable f => SelectionFoldable f a -> f a

#select

select :: forall f a. Foldable f => Eq a => a -> SelectionFoldable f a -> SelectionFoldable f a

#selectWith

selectWith :: forall f a. Foldable f => (a -> IsSelected) -> SelectionFoldable f a -> SelectionFoldable f a

#selectIndex

selectIndex :: forall i f a. FoldableWithIndex i f => Eq i => i -> SelectionFoldable f a -> SelectionFoldable f a

#selectWithIndex

selectWithIndex :: forall i f a. FoldableWithIndex i f => (i -> a -> IsSelected) -> SelectionFoldable f a -> SelectionFoldable f a

#deselect

deselect :: forall f a. SelectionFoldable f a -> SelectionFoldable f a

#selected

selected :: forall f a. SelectionFoldable f a -> Maybe a

#mapSelected

mapSelected :: forall f a b. Foldable f => Functor f => Eq a => (IsSelected -> a -> b) -> SelectionFoldable f a -> SelectionFoldable f b

#foldrSelected

foldrSelected :: forall f a b. Foldable f => Eq a => (IsSelected -> a -> b -> b) -> b -> SelectionFoldable f a -> b

#foldrWithIndexSelected

foldrWithIndexSelected :: forall i f a b. FoldableWithIndex i f => Eq a => (IsSelected -> i -> a -> b -> b) -> b -> SelectionFoldable f a -> b

#foldlSelected

foldlSelected :: forall f a b. Foldable f => Eq a => (IsSelected -> b -> a -> b) -> b -> SelectionFoldable f a -> b

#foldlWithIndexSelected

foldlWithIndexSelected :: forall i f a b. FoldableWithIndex i f => Eq a => (IsSelected -> i -> b -> a -> b) -> b -> SelectionFoldable f a -> b

Modules