Search found 5 matches
- Sat Nov 06, 2010 5:59 am
- Forum: Common Lisp
- Topic: Sequence of variables.
- Replies: 4
- Views: 8379
Re: Sequence of variables.
Thanks Warren and sorry for not recognizing your other post. After rethinking "how" I was going to use the data in the variables at a later point I decided to simply go with a list containing the data of the n variables. Later when I add to the list (the list will grow), since the operatio...
- Fri Nov 05, 2010 6:21 pm
- Forum: Common Lisp
- Topic: Sequence of variables.
- Replies: 4
- Views: 8379
Sequence of variables.
I am trying to create a sequence of variables say x1,x2,...,xn and I would greatly appreciate some feedback. I would like to think the code would be as simple as: (dotimes (i 10 nil) (setf xi 'value for xi)) so that in the end I have >x1 --> value for x1 >x2 --> value for x2 ... Thanks in advance fo...
- Fri Oct 08, 2010 4:37 am
- Forum: Common Lisp
- Topic: How to handle large prgrams in LISP
- Replies: 6
- Views: 9852
How to handle large prgrams in LISP
Hello, As I am still new to LISP, I am trying to develop a good understanding of LISP programming style. My question is if I have a program with multiple class definitions as well as method definitions, is it typical to place everything in one file or does the code get 'modularized' if you will. I h...
- Wed Sep 08, 2010 9:31 am
- Forum: Common Lisp
- Topic: New to LISP could use some help...thanks.
- Replies: 5
- Views: 5781
Re: New to LISP could use some help...thanks.
Thank you for all the replies, they helped me to understand this. For the "alternate solutions", this is part of a larger assignment and we need to use association lists.
Thanks Again.
Thanks Again.
- Sun Sep 05, 2010 10:39 am
- Forum: Common Lisp
- Topic: New to LISP could use some help...thanks.
- Replies: 5
- Views: 5781
New to LISP could use some help...thanks.
Hello all, I am writing a function that modifies an association list. In my code I have the following variable: (defvar *products* nil) and the following function: (defun add-product (alst widget quantity) (if (assoc widget alst) (setf (cdr (assoc widget alst)) (+ quantity (cdr (assoc widget alst)))...