feat: Allow nonrecursive whole-function dependencies (#2)

And implement negate on numbers, and use dependencies to define subtract.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Reviewed-on: #2
This commit is contained in:
Glen Whitney 2022-07-19 03:10:55 +00:00
parent f5e2e09aa2
commit b59a8c2ca9
6 changed files with 43 additions and 4 deletions

3
number/all.mjs Normal file
View file

@ -0,0 +1,3 @@
export {add} from './add.mjs'
export {negate} from './negate.mjs'
export {subtract} from '../generic/subtract.mjs'

3
number/negate.mjs Normal file
View file

@ -0,0 +1,3 @@
export const negate = {
number: [[], n => -n]
}