Jump to content

Sum and product of an array: Difference between revisions

(Add bruijn)
Line 2,085:
<syntaxhighlight lang="langur">val .list = series 19
writeln " list: ", .list
writeln " sum: ", fold ffn{+}, .list
writeln "product: ", fold ffn{x*}, .list</syntaxhighlight>
</syntaxhighlight>
 
{{out}}
1,007

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.