DEV Community

Discussion on: Grokking Lenses

Collapse
 
choc13 profile image
Matt Thornton

Yeah that’s right. Strictly speaking we don’t have to use F#+, we could use SRTP ourselves and just make sure that the type being returned from the Lens has something like a Map member that obeys the Functor laws and use this same constraint on the get/view set/setl implementations. But F#+ gives us a generic map function (as well as actually providing the lens combinators too), so in practice I just use that library if I want to use lenses.