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

Stability | provisional |

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

Safe Haskell | None |

# Documentation

setOf :: Hashable c => Getting (HashSet c) a b c d -> a -> HashSet cSource

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`

c =>`Getter`

a c -> a ->`HashSet`

c`setOf`

:: (`Eq`

c,`Hashable`

c) =>`Fold`

a c -> a ->`HashSet`

c`setOf`

::`Hashable`

c =>`Simple`

`Iso`

a c -> a ->`HashSet`

c`setOf`

::`Hashable`

c =>`Simple`

`Lens`

a c -> a ->`HashSet`

c`setOf`

:: (`Eq`

c,`Hashable`

c) =>`Simple`

`Traversal`

a c -> a ->`HashSet`

c