Handbook
Glossary
times ( ... n quot: ( ... -- ... ) -- ... )
Vocabulary
math
Inputs
n
an
integer
quot
a
quotation
Outputs
None
Word description
Calls the quotation
n
times.
Notes
If you need to pass the current index to the quotation, use
each-integer
.
Examples
USING: io math ; 3 [ "Hi" print ] times
Hi Hi Hi
Definition
USING:
kernel
;
IN:
math
:
times
( ... n quot: ( ... -- ... ) -- ... )
[
drop
]
prepose
each-integer
;
inline