Search found 7 matches

by reuben.cornel
Wed Aug 13, 2008 11:38 am
Forum: Common Lisp
Topic: how to use xml configuration file in LISP application
Replies: 3
Views: 4054

Re: how to use xml configuration file in LISP application

Have you considered using cl-xml? It seems to be a pretty neat library. You can find it here http://common-lisp.net/project/cl-xml/
by reuben.cornel
Mon Aug 04, 2008 12:31 pm
Forum: Common Lisp
Topic: Best program to use lisp on?
Replies: 17
Views: 18570

Re: Best program to use lisp on?

Perhaps this might the more accurate functional version?

Code: Select all

(defun price-order-total (item-list)
  (apply #'+ 
	 (mapcar #'(lambda(item)
		     (destructuring-bind (i quantity unit-price) item
		       (declare (ignore i))
		       (* unit-price quantity)))
		 item-list)))
by reuben.cornel
Tue Jul 22, 2008 5:17 pm
Forum: Common Lisp
Topic: Programming Style & (eval ...)
Replies: 17
Views: 18877

Re: Programming Style & (eval ...)

Nice reply Ramarren, liked your method of explanation.
by reuben.cornel
Tue Jul 22, 2008 5:12 pm
Forum: Common Lisp
Topic: Programming Style & (eval ...)
Replies: 17
Views: 18877

Re: Programming Style & (eval ...)

taylor_venable wrote: I'd also be interested to see any alternate implementations of and;
Here's my two cents...

Code: Select all

(defun my-and(&rest bool-list)
  (null (remove t bool-list)))
by reuben.cornel
Wed Jul 16, 2008 6:34 am
Forum: Common Lisp
Topic: (eval) and (compile) considered lame?
Replies: 3
Views: 5435

Re: (eval) and (compile) considered lame?

I don't know if I have understood your question right. Are you trying to achieve what the code below does? (defmacro increment-function-generator(function-name increment) "Macro that generates a function that increments its input by a specific pre-determined value" `(defun ,function-name(x) (+ x ,in...
by reuben.cornel
Tue Jul 15, 2008 10:10 am
Forum: Common Lisp
Topic: question about recursion (easy)
Replies: 8
Views: 9331

Re: question about recursion (easy)

I wrote up two functions that do the same thing, except that for the first one you need to reverse the result. (defun reverse-recursive-c-series(n a) (if (zerop n) (list a) (let ((return-a (reverse-recursive-c-series (- n 1) a))) (cond ((evenp (- n 1)) (cons (log (first return-a)) return-a)) ((oddp ...
by reuben.cornel
Mon Jun 30, 2008 12:29 pm
Forum: Books and Resources
Topic: What's your favorite book about Lisp?
Replies: 34
Views: 58474

Re: What's your favorite book about Lisp?

I don't know if SICP could be classified as lisp book. Yes it does talk about lisp, scheme to be more precise. But it is more of a general computer science book as it uses scheme as a means to explain general concepts.