Handbook
Glossary
bottom-up-tree ( item depth -- tree )
Vocabulary
benchmark
.
binary-trees
Inputs
item
an
object
depth
an
object
Outputs
tree
an
object
Definition
USING:
kernel
math
;
IN:
benchmark.binary-trees
:
bottom-up-tree
( item depth -- tree )
dup
0
>
[
1
-
[
drop
]
[
[
2
*
1
-
]
dip
bottom-up-tree
]
[
[
2
*
]
dip
bottom-up-tree
]
2tri
]
[
drop
f
f
]
if
<tree-node>
;
inline
recursive