Portability | portable |
---|---|

Stability | provisional |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Safe Haskell | Safe-Inferred |

- setmapped :: (Ord i, Ord j) => IndexPreservingSetter (Set i) (Set j) i j
- setOf :: Getting (Set a) s a -> s -> Set a

# Documentation

setmapped :: (Ord i, Ord j) => IndexPreservingSetter (Set i) (Set j) i jSource

setOf :: Getting (Set a) s a -> s -> Set aSource

Construct a set from a `Getter`

, `Fold`

, `Traversal`

, `Lens`

or `Iso`

.

`>>>`

fromList ["hello","world"]`setOf folded ["hello","world"]`

`>>>`

fromList [1,2,3]`setOf (folded._2) [("hello",1),("world",2),("!!!",3)]`

`setOf`

::`Getter`

s a -> s ->`Set`

a`setOf`

::`Ord`

a =>`Fold`

s a -> s ->`Set`

a`setOf`

::`Iso'`

s a -> s ->`Set`

a`setOf`

::`Lens'`

s a -> s ->`Set`

a`setOf`

::`Ord`

a =>`Traversal'`

s a -> s ->`Set`

a