I have a function called:
mapRouteEncoder ::
Prism' FilePath FilePath ->
Prism' r1 r2 ->
(b -> a) ->
RouteEncoder a r1 ->
RouteEncoder b r2
This function is often used by specifying "identity" prisms (if we can call it that) in the first two arguments because only the 3rd function is specified, viz.:
stringRouteEncoder
& mapRouteEncoder (prism' id Just) (prism' id Just) changeModel
I use optics-core
, and is there anything in that library to replace prism' id Just
something more idiomatic?