Skip to content

Commit 88572a4

Browse files
committed
Comment
1 parent a52b4fc commit 88572a4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Data/Lens/Iso.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ auf l = withIso l \sa bt f g e -> bt (f (rmap sa g) e)
3737
under :: forall s t a b. AnIso s t a b -> (t -> s) -> b -> a
3838
under l = withIso l \sa bt ts -> sa <<< ts <<< bt
3939

40+
-- | If `a1` is obtained from `a` by removing a single value, then
41+
-- | `Maybe a1` is isomorphic to `a`.
4042
non :: forall a. Eq a => a -> Iso' (Maybe a) a
4143
non def = iso (fromMaybe def) g
4244
where g a | a == def = Nothing

0 commit comments

Comments
 (0)