We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a52b4fc commit 88572a4Copy full SHA for 88572a4
src/Data/Lens/Iso.purs
@@ -37,6 +37,8 @@ auf l = withIso l \sa bt f g e -> bt (f (rmap sa g) e)
37
under :: forall s t a b. AnIso s t a b -> (t -> s) -> b -> a
38
under l = withIso l \sa bt ts -> sa <<< ts <<< bt
39
40
+-- | If `a1` is obtained from `a` by removing a single value, then
41
+-- | `Maybe a1` is isomorphic to `a`.
42
non :: forall a. Eq a => a -> Iso' (Maybe a) a
43
non def = iso (fromMaybe def) g
44
where g a | a == def = Nothing
0 commit comments