feat: Add and illustrate multiple ways of specifying implementations (#19)

Resolves #9.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Reviewed-on: #19
This commit is contained in:
Glen Whitney 2022-07-23 05:06:48 +00:00
parent 4fdafc751e
commit d72c443616
9 changed files with 81 additions and 22 deletions

View file

@ -1,5 +1,6 @@
import {use} from '../core/PocomathInstance.mjs'
export {Types} from './Types/bigint.mjs'
export const add = {
'...bigint': [[], addends => addends.reduce((x,y) => x+y, 0n)],
'...bigint': use([], addends => addends.reduce((x,y) => x+y, 0n))
}

View file

@ -1,3 +1,4 @@
import {use} from '../core/PocomathInstance.mjs'
export {Types} from './Types/bigint.mjs'
export const negate = {bigint: [[], b => -b ]}
export const negate = {bigint: use([], b => -b)}