From 5e25230dc9d861a23cfcef7c053e3d7c8f048300 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 1 Sep 2020 23:22:09 +0100 Subject: +macro to create a non-argument lambda: a procedure --- Emacs/.config/emacs/config.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 9972d59..71946a0 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -216,6 +216,17 @@ Basic, tail recursive algorithm for calculating powers init (pow a (- n 1) (* a init))))) #+end_src +** Define procedure +=lambda= provides a function with possible arguments. A procedure is +something I define as essentially a function without arguments. This +macro returns an anonymous function with no arguments with all the +forms provided. It returns it in 'backquoted' form as that is the most +common use of this macro. +#+begin_src emacs-lisp +(defmacro proc (&rest CDR) + "For a given list of forms CDR, return a quoted non-argument lambda." + `(quote (lambda () ,@CDR))) +#+end_src * Core packages ** General Setup general, a good package for defining keys. In this case, I -- cgit v1.2.3-13-gbd6f