## Search found 9 matches

Wed Oct 05, 2011 5:35 pm
Forum: Common Lisp
Topic: Help with a lisp program
Replies: 12
Views: 9971

### Re: Help with a lisp program

i finally got it. I defined a seperate function that compare x and y and plugged it into the minimum function! thanks so much for all the help
Wed Oct 05, 2011 5:07 pm
Forum: Common Lisp
Topic: symbols in lisp
Replies: 2
Views: 3061

### Re: symbols in lisp

I have this question to answer for a quiz and im at an impass. At first i couldnt figure out the E but now I cant figure out how to use a condition... This was the question: 4. Use cond and exp to define (activation type sum) which returns the activation value of a connectionist unit given a sum of ...
Wed Oct 05, 2011 2:00 pm
Forum: Common Lisp
Topic: symbols in lisp
Replies: 2
Views: 3061

### symbols in lisp

Hello,
I was wondering if anyone could let me know how I can have allegro common lisp recognize the mathematical symbol 'e' as the mathematical e and not a letter or something
thank you
Tue Oct 04, 2011 7:14 pm
Forum: Common Lisp
Topic: Help with a lisp program
Replies: 12
Views: 9971

### Re: Help with a lisp program

Well for my function I was thinking of it this way, 1. Take the inputted list 2. Assign the first number to the a list and assign the second variable to the b list 3. if a is smaller than b store it in a list, otherwise store b in the list 4. Take the next number and compare it to the list and do th...
Tue Oct 04, 2011 6:28 pm
Forum: Common Lisp
Replies: 11
Views: 17495

Also for the fourth question, we need to approach it like the Standard Deviation. So you define each part of the formula with a different function, and then total them all together.
Tue Oct 04, 2011 6:17 pm
Forum: Common Lisp
Topic: Help with a lisp program
Replies: 12
Views: 9971

### Re: Help with a lisp program

I thought of maybe using set f to define two variables and compare them, but i don't know if im on the right track...

Code: Select all

``````(defun minimum (lst)
"(lst)
return the minimum of a list"
(do (x lst (cdr x))
(setf 'a (car x))
(setf 'b (car (cdr x))
``````
Tue Oct 04, 2011 6:03 pm
Forum: Common Lisp
Topic: Help with a lisp program
Replies: 12
Views: 9971

### Re: Help with a lisp program

Here is how far along I got in the code. I know that I have to take the first number but I don't know how to compare it to each other value in the list individually...

Code: Select all

``````(defun minimum (lst)
"(lst)
return the minimum of a list"
(do (x lst (cdr x))
(result 0 (car x))``````
Tue Oct 04, 2011 5:31 pm
Forum: Common Lisp
Replies: 11
Views: 17495