import { sum } from "https://deno.land/x/iter@v3.2.3/mod.ts";
- Finds the sum of all items in
it
. -
warning: When ran on an endless iterable, this never returns.
Examples
Example 1
Example 1
import * as iter from "https://deno.land/x/iter";
const myRange = iter.create.range(1, 100);
console.log(iter.sum(myRange)); // -> 5050