From bf726a1b5e2489e59d0c56344ccf492fca7b15ed Mon Sep 17 00:00:00 2001 From: Pekka Laiho Date: Tue, 15 Dec 2020 22:07:12 +0700 Subject: [PATCH] =?UTF-8?q?macro=20for=20using=20=CE=BB=20instead=20of=20f?= =?UTF-8?q?n=20for=20lambdas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mad/misc.mad | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mad/misc.mad b/mad/misc.mad index 6f90b82..f80e3d4 100644 --- a/mad/misc.mad +++ b/mad/misc.mad @@ -1,2 +1,5 @@ ;; 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))))