-
LISP question
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
-
I usnderstood nothing of that post. Please clarify a bit. What data do you want the function to work on? If it is an array, please post an array. what do you want the function to do?
What do you mean by atom? and a nested list? do you mean an array?
-
Its LISP - List Processing. A programming language I believe. I havn't got a clue how to do it though.
http://www.engin.umd.umich.edu/CIS/c...lisp/lisp.html
-
I did a little bit of Lisp coding in school back in the '70s but I'm not going to be able to answer your question after all these years. :p However, I did Google for 'lisp forum' and had over 100k hits. Here are some of the more interesting ones:
http://forums.belution.com/en/lisp/
http://www.planet-source-code.com/vb....asp?lngWid=13
http://www.artofprogramming.com/bb/index.php
http://www.tek-tips.com/gthreadminde...ev3/32/pid/217
For Acidic, here is the definition of atom.
and here is a list of atoms and lists(nested) ((A B) (B) C (D E F)) and an example of processing lists.