Handbook
Glossary
reps-getter-quot ( reps -- quot )
Vocabulary
compiler
.
cfg
.
representations
.
preferred
.
private
Inputs
reps
an
object
Outputs
quot
an
object
Definition
USING:
accessors
arrays
combinators
compiler.cfg.instructions.syntax
kernel
sequences
sequences.generalizations
;
IN:
compiler.cfg.representations.preferred.private
:
reps-getter-quot
( reps -- quot )
dup
[
rep>>
{
f
scalar-rep
}
member-eq?
not
]
all?
[
[
rep>>
]
map
[
drop
]
swap
suffix
]
[
[
rep>>
rep-getter-quot
]
map
dup
length
{
{
0
[
drop
[
drop
f
]
]
}
{
1
[
first
[
1array
]
compose
]
}
{
2
[
first2
[
bi
2array
]
2curry
]
}
[
[
[
cleave
]
curry
]
dip
[
narray
]
curry
compose
]
}
case
]
if
;