Skip to content

Commit

Permalink
fix: better test
Browse files Browse the repository at this point in the history
  • Loading branch information
fgdorais committed Dec 18, 2023
1 parent 1a05a80 commit f130fd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parser/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def lookAhead (p : ParserT ε σ α m β) : ParserT ε σ α m β := do

/-- `test p` returns `true` if `p` succeeds and `false` otherwise, never fails -/
@[inline] def test (p : ParserT ε σ α m β) : ParserT ε σ α m Bool :=
Option.isSome <$> option? p
optionD false (p *> return true)

/-- `foldl f q p` -/
@[specialize] partial def foldl (f : γ → β → γ) (init : γ) (p : ParserT ε σ α m β) : ParserT ε σ α m γ :=
Expand Down

0 comments on commit f130fd0

Please sign in to comment.