pocomath/generic/subtract.mjs
Glen Whitney b59a8c2ca9 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
2022-07-19 03:10:55 +00:00

4 lines
106 B
JavaScript

export const subtract = {
'any,any': [['add', 'negate'], ref => (x,y) => ref.add(x, ref.negate(y))]
}