abcdefg
Apr 28th, 2004, 05:23 PM
Okay I could not find a forum for lisp so ill put it here. There is a function called member.
Here are some examples of its use:
(member 3 '(1 2 3 4 5)
Answer: (3 4 5)
(member 'hey '(whats going on here))
Answer: NIL
(member 'key '(where did (i (put) the (key))))
Asnwer: NIL
Now im supposed to write a recursive function which checks for an atom like say 3 inside of nested lists.
This function should evaluate the functions:
Examples: (somefunction 3 '(1 2 3 4 5))
T
(somefunction 'hey '(whats going on here))
NIL
Here are some examples of its use:
(member 3 '(1 2 3 4 5)
Answer: (3 4 5)
(member 'hey '(whats going on here))
Answer: NIL
(member 'key '(where did (i (put) the (key))))
Asnwer: NIL
Now im supposed to write a recursive function which checks for an atom like say 3 inside of nested lists.
This function should evaluate the functions:
Examples: (somefunction 3 '(1 2 3 4 5))
T
(somefunction 'hey '(whats going on here))
NIL