Open user471 opened 8 years ago
newtype Bar = {bar :: Int} newtype Foo = {foo :: Bar}
Lenses like this
bar = lens (\(Bar x) -> x.bar) (\(Bar x) v -> Bar x { bar = v })
instead of
bar = lens _."bar" (_ { "bar" = _ })
looks better
x # foo <<< bar .~ 10
than
x # _Foo <<< foo <<< _Bar <<< bar .~ 10
Lenses like this
instead of
looks better
than