Visualize an Except
using a checkmark or a cross.
Equations
- (Except.error a).emoji = Lean.crossEmoji
- (Except.ok a).emoji = Lean.checkEmoji
Instances For
def
Except.pmap
{ε : Type u}
{α β : Type v}
(x : Except ε α)
(f : (a : α) → x = ok a → β)
:
Except ε β
Map a function over an Except
value, using a proof that the value is .ok
.
Equations
- (Except.error e).pmap f_2 = Except.error e
- (Except.ok a).pmap f_2 = Except.ok (f_2 a ⋯)