Package Exports
- lispy-arithmetic
- lispy-arithmetic/lispy-arithmetic.cjs
- lispy-arithmetic/lispy-arithmetic.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lispy-arithmetic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
lispy-arithmetic
A small javascript library to do arithmetic in a lisp-inspired way.
Installation
npm install lispy-arithmeticUsage
var la = require('lispy-arithmetic');
la.add(); // 0
la.add(3); // 3
la.add(3, 2); // 5
la.add(3, 2, 4); // 9
la.sub(); // 0
la.sub(3); // 3
la.sub(3, 2); // 1
la.sub(7, 3, 2); // 2
la.mult(); // 1
la.mult(3); // 3
la.mult(3, 2); // 6
la.mult(3, 2, 4); // 24
la.div(); // 1
la.div(3); // 3
la.div(6, 3); // 2
la.div(12, 3, 2); // 2
la.add(
la.mult(
la.add(1, 3),
la.sub(6, 4)),
la.div(
la.sub(10, 4),
la.add(-2, 5))); // 10License
Licensed under MIT.