Add a lens for Set that works with 'Bool -> Bool'
This allow to work with sets using the standard lens mechanisms. Also add a function that creates a lens where a setter function also uses the information from a getter. This allows to optimize the setter, in particular in the case of Set, keep the set unmodified, if the inner function doesn't change anything. Signed-off-by: Petr Pudlak <email@example.com> Reviewed-by: Klaus Aehlig <firstname.lastname@example.org>
Showing with 21 additions and 0 deletions