Handbook
Glossary
at-most-n ( parser n -- parser' )
Vocabulary
parser-combinators
Inputs
parser
an
object
n
an
object
Outputs
parser'
an
object
Definition
USING:
kernel
math
;
IN:
parser-combinators
:
at-most-n
( parser n -- parser' )
dup
zero?
[
2drop
epsilon
]
[
2dup
exactly-n
-rot
1
-
at-most-n
<|>
]
if
;