>>...You could do some really fancy stuff with that.<<
Indeed. The cool thing about Lisp is that expressions are just lists -- the first item in a list is the name of a function, and the rest of the items are its arguments. So something like (equal (+ 2 2) 4)) returns true, because 4 is equal to 2+2.
The main use of macros is to extend a language rather than to extend a program that does something else. The name comes from "macro instruction" in assembly language.
no subject
Date: 2018-07-27 09:28 pm (UTC)Indeed. The cool thing about Lisp is that expressions are just lists -- the first item in a list is the name of a function, and the rest of the items are its arguments. So something like (equal (+ 2 2) 4)) returns true, because 4 is equal to 2+2.
The main use of macros is to extend a language rather than to extend a program that does something else. The name comes from "macro instruction" in assembly language.