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

Stability | provisional |

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

Safe Haskell | None |

# Documentation

setOf :: Hashable a => Getting (HashSet a) s t a b -> s -> HashSet aSource

Construct a set from a `Getter`

, `Fold`

, `Traversal`

, `Lens`

or `Iso`

.

`>>>`

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

`setOf`

::`Hashable`

a =>`Getter`

s a -> s ->`HashSet`

a`setOf`

:: (`Eq`

a,`Hashable`

a) =>`Fold`

s a -> s ->`HashSet`

a`setOf`

::`Hashable`

a =>`Simple`

`Iso`

s a -> s ->`HashSet`

a`setOf`

::`Hashable`

a =>`Simple`

`Lens`

s a -> s ->`HashSet`

a`setOf`

:: (`Eq`

a,`Hashable`

a) =>`Simple`

`Traversal`

s a -> s ->`HashSet`

a