Module
Data.SelectionFoldable
- Package
- purescript-selection-foldable
- Repository
- jamieyung/purescript-selection-foldable
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 Source
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 Source
fromFoldable :: forall a f. Foldable f => f a -> SelectionFoldable f a
#toFoldable Source
toFoldable :: forall a f. Foldable f => SelectionFoldable f a -> f a
#select Source
select :: forall a f. Foldable f => Eq a => a -> SelectionFoldable f a -> SelectionFoldable f a
#selectWith Source
selectWith :: forall a f. Foldable f => (a -> IsSelected) -> SelectionFoldable f a -> SelectionFoldable f a
#selectIndex Source
selectIndex :: forall a f i. FoldableWithIndex i f => Eq i => i -> SelectionFoldable f a -> SelectionFoldable f a
#selectWithIndex Source
selectWithIndex :: forall a f i. FoldableWithIndex i f => (i -> a -> IsSelected) -> SelectionFoldable f a -> SelectionFoldable f a
#deselect Source
deselect :: forall a f. SelectionFoldable f a -> SelectionFoldable f a
#selected Source
selected :: forall a f. SelectionFoldable f a -> Maybe a
#mapSelected Source
mapSelected :: forall b a f. Foldable f => Functor f => Eq a => (IsSelected -> a -> b) -> SelectionFoldable f a -> SelectionFoldable f b
#foldrSelected Source
foldrSelected :: forall b a f. Foldable f => Eq a => (IsSelected -> a -> b -> b) -> b -> SelectionFoldable f a -> b
#foldrWithIndexSelected Source
foldrWithIndexSelected :: forall b a f i. FoldableWithIndex i f => Eq a => (IsSelected -> i -> a -> b -> b) -> b -> SelectionFoldable f a -> b
#foldlSelected Source
foldlSelected :: forall b a f. Foldable f => Eq a => (IsSelected -> b -> a -> b) -> b -> SelectionFoldable f a -> b
#foldlWithIndexSelected Source
foldlWithIndexSelected :: forall b a f i. FoldableWithIndex i f => Eq a => (IsSelected -> i -> b -> a -> b) -> b -> SelectionFoldable f a -> b