Handbook
Glossary
inline-changer ( name -- quot' )
Changer syntax
Prev:
change:
Vocabulary
changer
Inputs
name
a
string
Outputs
quot'
a
quotation
Word description
A macro that takes a slot name and applies the quotation to a slot of a tuple.
Definition
USING:
kernel
quotations
sequences
words
;
IN:
changer
MACRO:
inline-changer
( name -- quot' )
[
">>"
append
]
[
">>"
prepend
]
bi
[
"accessors"
lookup-word
1quotation
]
bi@
[
[
dip
call
]
curry
]
dip
[
[
[
over
]
]
dip
[
dip
swap
]
curry
compose
]
dip
compose
;