VocabularysequencesInputsseq | a sequence |
map-quot | a quotation with stack effect ( ..a elt -- ..a intermediate ) |
reduce-quot | a quotation with stack effect ( ..a prev intermediate -- ..a next ) |
OutputsWord descriptionCalls
map-quot on each element and combines the results using
reduce-quot in the same manner as
reduce, except that there is no identity element, and the sequence must have a length of at least 1.
ErrorsThrows an error if the sequence is empty.
ExamplesUSING: sequences prettyprint math ;
{ 1 3 5 } [ sq ] [ + ] map-reduce .
35
Definition