Handbook
Glossary
product ( seq -- n )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Sequence combinators
Prev:
sum ( seq -- n )
Next:
any? ( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
Vocabulary
sequences
Inputs
seq
a
sequence
of
number
s
Outputs
n
a
number
Word description
Outputs the product of all elements of
seq
. Outputs one given an empty sequence.
Definition
USING:
math
;
IN:
sequences
:
product
( seq -- n )
1
[
*
]
binary-reduce
;