Handbook
Glossary
unpacker ( seq -- quot )
Vocabulary
memoize
.
private
Inputs
seq
an
object
Outputs
quot
an
object
Definition
USING:
arrays
kernel
kernel.private
math
sequences
sequences.private
;
IN:
memoize.private
:
unpacker
( seq -- quot )
length
dup
dup
4
<=
[
{
[
drop
]
[
]
[
first2-unsafe
]
[
first3-unsafe
]
[
first4-unsafe
]
}
nth
]
[
[firstn]
]
if
swap
1
>
[
[
{
array
}
declare
]
prepose
]
when
;