Handbook
Glossary
(product-each) ( ... ns sequences k quot: ( ... seq -- ... ) -- ... )
Vocabulary
sequences
.
product
.
private
Inputs
ns
an
object
sequences
an
object
k
an
object
quot
a
quotation
with stack effect
( ... seq -- ... )
Outputs
None
Definition
USING:
kernel
math
sequences
sequences.private
;
IN:
sequences.product.private
::
(product-each)
( ... ns sequences k quot: ( ... seq -- ... ) -- ... )
k sequences
length
1
-
=
:>
done? k sequences
nth-unsafe
[
k ns
set-nth-unsafe
ns done? quot
[
sequences k 1
+
quot
(product-each)
]
if
]
each
;
inline
recursive