Factor Documentation

Home

Glossary

Search
factorcode.org
sumlengths ( seq  n )
Vocabulary
sequences
Inputs and outputs
seq
a
sequence
of
sequence
s
n
an
integer
Word description
Outputs the sum of the lengths of all sequences in
seq
.
Definition
IN:
sequences
GENERIC:
sumlengths
( seq  n )
Methods
USING:
kernel
math
sequences
;
M:
object
sumlengths
0
[
length
+
]
reduce
;
USING:
accessors
kernel
math
sequences
;
M:
repetition
sumlengths
[
length>>
]
[
elt>>
length
]
bi
*
;