Results 1 to 4 of 4

Thread: LISP question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2003
    Posts
    149

    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

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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?
    Have I helped you? Please Rate my posts.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    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
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    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. 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.
    Last edited by ccoder; Apr 29th, 2004 at 01:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width