Handbook
Glossary
swizzle ( sequence quot -- sequence' )
Quadtrees
Prev:
map-quadrant ( node quot: ( child-node -- x ) -- array )
Vocabulary
quadtrees
Inputs
sequence
a
sequence
quot
a
quotation
Outputs
sequence'
a
sequence
Word description
Swizzles
sequence
based on the two-dimensional vector values returned by calling
quot
on each element of
sequence
.
Definition
USING:
assocs
kernel
math.rectangles
sequences
;
IN:
quadtrees
:
swizzle
( sequence quot -- sequence' )
dupd
map
[
zip
]
[
rect-containing
<quadtree>
]
bi
[
[
[
first2
]
]
dip
[
set-at
]
curry
compose
each
]
[
values
]
bi
;
inline