You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the module Lets.Lens, there is a setter function and a type alias that goes with it.
typeSetstab=
(a->Identityb)
->s->Identityt--| Let's write an inverse to @over@ that does the @Identity@ wrapping &-- unwrapping.sets::
((a->b) ->s->t)
-> ( a->Identityb)
->s->Identityt-- -> Set s t a b
sets f idM =Identity. f (getIdentity . idM)
mapped::Functorf=>Set (fa) (fb) ab
mapped = sets fmapset::Setstab->s->b->t
set q s b = over q (const b) s
Later in the module, we can see the use of the data structure Set, which has nothing to do with the setter functions and therefore can be confusing.
It may be worth renaming the setter functions, perhaps to update or something else.
The text was updated successfully, but these errors were encountered:
In the module
Lets.Lens
, there is a setter function and a type alias that goes with it.Later in the module, we can see the use of the data structure
Set
, which has nothing to do with the setter functions and therefore can be confusing.It may be worth renaming the setter functions, perhaps to
update
or something else.The text was updated successfully, but these errors were encountered: