User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 391,858 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,593 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser:
Views: 2725 | Replies: 1
Reply
Join Date: Jan 2005
Posts: 31
Reputation: tat2dlady is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
tat2dlady tat2dlady is offline Offline
Light Poster

Help Anyone know pure LISP?

  #1  
Feb 6th, 2005
I am having some trouble understanding pure LISP. I am confused about the concepts of atoms and flat lists vs. any lists. I have a problem that should be fairly simple, although it uses recursion, which I am not very familiar with using. The function takes 1 argument which can be any list. It returns the number of atoms named A in the list. I was trying to see if there was only one element in the list and, if so, is it an A. If it is, return a 1. This is what I have:

(defun A-Count (L)
(cond
((null L) nil) ;This works fine
((equal (atom a) L) 1)
)
)

I do not have the default set up yet. Was just trying to get the first working. However, when I run it I get an "error - unbound function" or "error - unbound variable", depending on which example I try to enter. Thanks for any info anyone may have.

It's all Greek to me!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,394
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 172
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: Anyone know pure LISP?

  #2  
Mar 29th, 2005
Here is a little insight into Lisp from a Python programmer. I found it interesting to read ...
http://ibiblio.org/obp/py4fun/lisp/lisp.html
May 'the Google' be with you!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Legacy and Other Languages Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Legacy and Other Languages Forum

All times are GMT -4. The time now is 6:36 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC