picomath/number/add.js
Glen Whitney 536656bfe8 feat: Initial core of picomath
Implements a totally simplistic "poortf" mutable typed function and
  a picomath instance generator, as well as the very beginnings of a
  number type and one generic function and a default full picomath instance.

  Also provides some tests which serve as usage examples.
2022-03-25 00:49:03 -07:00

7 lines
178 B
JavaScript

import { allNumbers } from './number.js'
export default function create(pmath) {
return pmath('add', [allNumbers,
(...addends) => addends.reduce((x,y) => x+y, 0)])
}