Glen Whitney
536656bfe8
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.
7 lines
178 B
JavaScript
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)])
|
|
}
|