- Most impressive examples of the LOOP macro
"Tron3k" <tron3k@gmail.com> writes:> currently figuring out iteration constructs. In particular, I am> experimenting with a method of iteration that iterates in parallel over> several lazy sequences, stopping when any of them terminates. I have> found this useful to replace sev...
- Most efficient way of adding to a list?
As a student (still) of Common Lisp, I've been using it to develop anexperimental project, and I came across the following situation:Suppose you have a global list to which you need to add more items(without duplication) periodically at runtime.Here's the solution I came up with:(setf...
- More trying to grok FORMAT, ~A padding control now.
Now I'm trying to understand the rationale behind the prefixparameters to the ~A (and ~S) FORMAT directives. I get *how* it worksbut I'm having a hard time figuring out what actual problem thecombination of mincol, colinc, and minpad solves. As in, some kind ofproblem statement of the...
- More trying to grok FORMAT, ~A padding control now.
Now I'm trying to understand the rationale behind the prefixparameters to the ~A (and ~S) FORMAT directives. I get *how* it worksbut I'm having a hard time figuring out what actual problem thecombination of mincol, colinc, and minpad solves. As in, some kind ofproblem statement of the...
- More trouble with make-package
I can't find out precisely why this code works:(make-package 'pkg :use '(common-lisp))(in-package pkg)(defun test () (print "This is pkg:test.") (terpri))(export '(test))(in-package :cl-user)(pkg:test)while the following, in which I simply turned the first paragraph into afun...
- More questions about exported symbols and general style.
Well, two questions about exporting symbols, really. Say I want to setup bindings to captured variables (like IT in anaphoric macros) inpackages that I'll be using. Do I want to just export IT and friends,or should I walk through the code and replace them with gensyms orsomething?Also, I...