Search found 3 matches
- Tue Mar 22, 2011 2:34 pm
- Forum: Common Lisp
- Topic: checking item from input list
- Replies: 6
- Views: 7447
Re: checking item from input list
Odd, yes that is exactly what I am looking for. What's weird is when I copy and paste the function in your post into REPL and change the name to getInputTypeRead1 and then invoke the function, I get the desired results, the same you got. However, I am still getting the incorrect results for when I t...
- Tue Mar 22, 2011 2:01 pm
- Forum: Common Lisp
- Topic: checking item from input list
- Replies: 6
- Views: 7447
Re: checking item from input list
What mistake? I don't think there is one, and No, that's not what I want to do. I exactly want to return 0 if the list inputSeq is nil or if the first element is something other than bees, otherwise return 1. That is, return 1 if the first element exists and is bees. Find will return 1 if the item i...
- Tue Mar 22, 2011 11:56 am
- Forum: Common Lisp
- Topic: checking item from input list
- Replies: 6
- Views: 7447
checking item from input list
Hi, I made the following function: (defun getInputTypeRead () (let ((inputSeq (read))) (cond ((EQ inputSeq nil) 0) ((not (equal (first inputSeq) 'bees)) 0) (T 1)))) with input list typed in as (bees are nice) I want this to come up with a value of 1. I've tried EQ, equal, equalp, and none of them se...