Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
ncurry ( n -- )
Factor documentation
>
Factor handbook
>
The language
>
Combinators
>
Generalized shuffle words and combinators
>
Additional generalizations
Next:
nwith ( n -- )
Vocabulary
generalizations
Inputs and outputs
n
an
integer
Word description
A generalization of
curry
that can work for any stack depth.
Examples
Some core words expressed in terms of
ncurry
:
curry
1 ncurry
2curry
2 ncurry
3curry
3 ncurry
Definition
USING:
kernel
;
IN:
generalizations
:
ncurry
( n -- )
[
curry
]
swap
call-n
;
inline