| Copyright | (C) 2012-16 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Data.Set.Lens
Description
Documentation
setOf :: Getting (Set a) s a -> s -> Set a Source #
Construct a set from a Getter, Fold, Traversal, Lens or Iso.
>>>setOf folded ["hello","world"]fromList ["hello","world"]
>>>setOf (folded._2) [("hello",1),("world",2),("!!!",3)]fromList [1,2,3]
setOf::Getters a -> s ->SetasetOf::Orda =>Folds a -> s ->SetasetOf::Iso's a -> s ->SetasetOf::Lens's a -> s ->SetasetOf::Orda =>Traversal's a -> s ->Seta