Safe Haskell | None |
---|---|
Language | Haskell2010 |
Lenses
rlens :: (Settable field val' old new, Gettable field old val, Functor f) => Key field -> (val -> f val') -> Book' old -> f (Book' new) Source #
Build a lens from a field
julian ^. rlens #age = 28
Symbols can also be used directly as lenses, so you probably don't need to use rlens
:
julian ^. #age = 28
julian & #age .~ 29 = Book {age = 29, name = "Julian K. Arni"}