madlisp/mad/misc.mad
2020-12-15 22:07:12 +07:00

6 lines
210 B
Plaintext

;; Measure how long it takes to execute f
(defn timeFn (f) (let (st (mtime)) (f) (- (mtime) st)))
;; Allow λ instead of fn for lambda
(defmacro λ (args body) (quasiquote (fn (unquote args) (unquote body))))