From 7ac429383b6fb61c24de2b7f9b1322dfdaea6f93 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 9 Nov 2020 22:33:42 +0300 Subject: fix(core): rename plus to add, minus to sub --- core.fnl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core.fnl') diff --git a/core.fnl b/core.fnl index fd25a02..d22beec 100644 --- a/core.fnl +++ b/core.fnl @@ -501,21 +501,21 @@ that would apply to that value, or `nil' if none apply and no default." (or (. (getmetatable multifn) :multimethods dispatch-val) (. (getmetatable multifn) :multimethods :default))) -(fn* core.plus +(fn* core.add ([] 0) ([a] a) ([a b] (+ a b)) ([a b c] (+ a b c)) ([a b c d] (+ a b c d)) - ([a b c d & rest] (apply plus (+ a b c d) rest))) + ([a b c d & rest] (apply add (+ a b c d) rest))) -(fn* core.minus +(fn* core.sub ([] 0) ([a] (- a)) ([a b] (- a b)) ([a b c] (- a b c)) ([a b c d] (- a b c d)) - ([a b c d & rest] (apply minus (- a b c d) rest))) + ([a b c d & rest] (apply sub (- a b c d) rest))) (fn* core.mul ([] 1) -- cgit v1.2.3