mirror of
https://github.com/janet-lang/janet
synced 2026-11-04 12:34:27 +00:00
Add sum and product functions to boot.dst.
This commit is contained in:
1 parent
8a346ec655
commit
3b30b98ec0
1 file changed
+3
@@ -102,6 +102,9 @@
|
||||
})
|
||||
(fn [x] (not (get non-atomic-types (type x))))))
|
||||
|
||||
(defn sum [xs] (apply1 + xs))
|
||||
(defn product [xs] (apply1 * xs))
|
||||
|
||||
# C style macros and functions for imperative sugar
|
||||
(defn inc [x] (+ x 1))
|
||||
(defn dec [x] (- x 1))
|
||||
|
||||
Reference in new issue
Block a user