Search found 6 matches
- Mon Mar 21, 2011 7:04 am
- Forum: Common Lisp
- Topic: Switch package
- Replies: 2
- Views: 3830
Re: Switch package
Wow - your answer is eye-opening for me! Thanks!
- Mon Mar 21, 2011 4:26 am
- Forum: Common Lisp
- Topic: Switch package
- Replies: 2
- Views: 3830
Switch package
Hi! I am trying to write a macro, which dynamically binds the current package: (defmacro with-in-package (package-designator &body body) `(let ((*package* (find-package ,package-designator))) ,@body)) which expands like this: (macroexpand-1 '(with-in-package :sb-cltl2 (variable-information '*pac...
- Sun Mar 20, 2011 7:30 am
- Forum: Common Lisp
- Topic: a very simple function
- Replies: 3
- Views: 5605
Re: a very simple function
Another (non-destructive) solution:
See http://www.lispworks.com/documentation/ ... append.htm
Code: Select all
(append S (list N))
- Sun Feb 13, 2011 4:25 am
- Forum: Common Lisp
- Topic: Macros: double backquote & unquote
- Replies: 5
- Views: 5637
Re: Macros: double backquote & unquote
Hi FAU! I found an other solution in "On LIsp" in chapter 16 "Macros-Defining Macros" on page 215, where Paul Graham explains the solution step by step. (defmacro with-partial-macro (name macro list-of-args &body body) `(macrolet ((,name (&rest more-args) `(,',macro ,@',l...
- Sat Feb 12, 2011 7:36 am
- Forum: Common Lisp
- Topic: Macros: double backquote & unquote
- Replies: 5
- Views: 5637
Macros: double backquote & unquote
Hi! I am fairly new to CL and have problems with nested backquotes and unquotes. I am trying something like currying or "partial" (in Clojure) does for functions but here with macros - I want to partially bind macros with parameters in a MACROLET-environment: (defmacro with-partial-macro (...
- Sat Feb 12, 2011 5:32 am
- Forum: Common Lisp
- Topic: Literal Lists
- Replies: 19
- Views: 21932
Re: Literal Lists
Mostly "LOL" is related to Land of Lisp 
edit: the following refers to Let over Lambda
And yes, there is a warning in the book with the example calling this function twice:
(defun dangerous-use-of-bq ()
`(a ,.'(b c d) e))

edit: the following refers to Let over Lambda
And yes, there is a warning in the book with the example calling this function twice:
(defun dangerous-use-of-bq ()
`(a ,.'(b c d) e))