Search found 6 matches
- Wed May 16, 2012 5:11 pm
- Forum: Homework
- Topic: Lisp function help
- Replies: 0
- Views: 7168
Lisp function help
This function works but I also need the condition that the path has to include the library. (defun depth1 (queue finish) (cond ((null queue) nil) ((equal finish (caar queue)) (print queue) (reverse (car queue))) (t (print queue) (depth1 (append (expand (car queue)) (cdr queue)) finish)))) My attempt...
- Tue May 15, 2012 4:04 pm
- Forum: Homework
- Topic: Do I post too much? lol
- Replies: 0
- Views: 6736
Do I post too much? lol
The map that my project deals with http://www-personal.engin.umd.umich.edu/~bmaxim/cis479/robbie.txt My functions that deal with my problem (defun look (direction loc) (cdr (assoc direction (choices loc)))) (defun ValidMove(direction loc) (cond ((eql nil (look direction loc))nil) (t t))) (defun mov...
- Mon May 14, 2012 1:23 pm
- Forum: Homework
- Topic: Simple Question
- Replies: 1
- Views: 7727
Simple Question
How do you modify/edit a function that's been created? (This is the start of 2nd week of learning the language)
- Sun May 13, 2012 6:22 pm
- Forum: Homework
- Topic: Where oh where do I go?
- Replies: 1
- Views: 7992
Where oh where do I go?
So I've posted a question about this topic before, but I figured this is better than trying to get a response from a reply. Anyways, I've tried what someone suggested and now I'm confused on a small thing. So the input is a room in a house and the output is the rooms that are 1 room away from that i...
- Sun May 13, 2012 8:03 am
- Forum: Homework
- Topic: rooms of a house
- Replies: 2
- Views: 8871
Re: rooms of a house
Ok thanks. Other than that function, I figured out 2 more functions from that out of 8 total. So now I have another question. This time, I need to return either 2 or 3 rooms based on directional from each room, not just 1 number or string. Example: Input: Dining-Room Output: ((east downstairs-bedroo...
- Sat May 12, 2012 2:22 pm
- Forum: Homework
- Topic: rooms of a house
- Replies: 2
- Views: 8871
rooms of a house
I'm working on my first ever assignment dealing with Lisp. My function deals with 9 rooms of a house. 1.Library 2. Upstairs-bedroom 3. back-stairs 4. front-stairs 5. downstairs-bedroom 6. living-room 7.dining-room 8. kitchen 9.pantry -The input is a room and the output is the number of direct rooms ...