Do
import * as do from "zurch/do"
This package exposes common abstractions and computations, as functions.
Using Partials
These functions are special built so they can be partially invoked.
import {sum} from "zurch/do/math"
// used first value only
const add2 = sum(2);
// 2 + 1 = 3
add2(1) === 3;
const {sum} = require("zurch").do.math;
// used first value only
const add2 = sum(2);
// 2 + 1 = 3
add2(1) === 3;
Using Lists
A list argument will be reduced using the the task
import {sum} from "zurch/do/math"
sum([4, 5, 1]) === 12;
const {sum} = require("zurch").do.math;
sum([4, 5, 1]) === 12;
Using
import {sum} from "zurch/do/math"
// 2 + 2 = 4
sum(2, 2) === 4;
const {sum} = require("zurch").do.math;
// 2 + 2 = 4
sum(2, 2) === 4;