git.iko.soy/semi-iso-optics
on master help sign in
Update comments.
ff4a426Paweł Nowak
Control/Lens/SemiIso.hs+4−4
@@ -297,7 +297,7 @@ unfoldlM1 f a0 = go a0 []
297 Just (new_a, b) -> go new_a (b : bs)
297 Just (new_a, b) -> go new_a (b : bs)
298 Nothing -> return (a : bs)
298 Nothing -> return (a : bs)
299
299
300−-- | Constructs a bidirectional fold.
300+-- | Constructs a bidirectional fold. Works with prisms.
301--
301--
302-- \-> Right unfolds using the (->) part of the given semi-iso, until it fails.
302-- \-> Right unfolds using the (->) part of the given semi-iso, until it fails.
303--
303--
@@ -305,7 +305,7 @@ unfoldlM1 f a0 = go a0 []
305bifoldr :: ASemiIso' a (b, a) -> SemiIso' a (a, [b])
305bifoldr :: ASemiIso' a (b, a) -> SemiIso' a (a, [b])
306bifoldr = bifoldr_ . attemptAp_
306bifoldr = bifoldr_ . attemptAp_
307
307
308−-- | Constructs a bidirectional fold.
308+-- | Constructs a bidirectional fold. Works with prisms.
309--
309--
310-- \-> Right unfolds using the (->) part of the given semi-iso, until it fails.
310-- \-> Right unfolds using the (->) part of the given semi-iso, until it fails.
311-- It should produce a non-empty list.
311-- It should produce a non-empty list.
@@ -314,7 +314,7 @@ bifoldr = bifoldr_ . attemptAp_
314bifoldr1 :: ASemiIso' a (a, a) -> SemiIso' a [a]
314bifoldr1 :: ASemiIso' a (a, a) -> SemiIso' a [a]
315bifoldr1 = bifoldr1_ . attemptAp_
315bifoldr1 = bifoldr1_ . attemptAp_
316
316
317−-- | Constructs a bidirectional fold.
317+-- | Constructs a bidirectional fold. Works with prisms.
318--
318--
319-- \-> Left unfolds using the (->) part of the given semi-iso, until it fails.
319-- \-> Left unfolds using the (->) part of the given semi-iso, until it fails.
320--
320--
@@ -322,7 +322,7 @@ bifoldr1 = bifoldr1_ . attemptAp_
322bifoldl :: ASemiIso' a (a, b) -> SemiIso' a (a, [b])
322bifoldl :: ASemiIso' a (a, b) -> SemiIso' a (a, [b])
323bifoldl = bifoldl_ . attemptAp_
323bifoldl = bifoldl_ . attemptAp_
324
324
325−-- | Constructs a bidirectional fold.
325+-- | Constructs a bidirectional fold. Works with prisms.
326--
326--
327-- \-> Left unfolds using the (->) part of the given semi-iso, until it fails.
327-- \-> Left unfolds using the (->) part of the given semi-iso, until it fails.
328-- It should produce a non-empty list.
328-- It should produce a non-empty list.