Skip to content

Commit

Permalink
Update src/Init/Control/Basic.lean
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeata authored Apr 11, 2024
1 parent 7da18a6 commit 01fd9b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Init/Control/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ Important instances include
class Alternative (f : Type u → Type v) extends Applicative f : Type (max (u+1) v) where
/-- See `Alternative`. -/
failure : {α : Type u} → f α
/-- See `Alternative`. Can be writen using `<|>`. -/
/--
Depending on the `Alternative` instance, collects values or recovers from `failure`s by
returning the leftmost success. Can be written using the `<|>` operator syntax.
-/
orElse : {α : Type u} → f α → (Unit → f α) → f α

instance (f : Type u → Type v) (α : Type u) [Alternative f] : OrElse (f α) := ⟨Alternative.orElse⟩
Expand Down

0 comments on commit 01fd9b7

Please sign in to comment.