How to get "NIGHT" node from LISP list (((GOOD))((NIGHT))) ?

Reply

Join Date: Sep 2008
Posts: 5
Reputation: bicarbonato is an unknown quantity at this point 
Solved Threads: 0
bicarbonato bicarbonato is offline Offline
Newbie Poster

How to get "NIGHT" node from LISP list (((GOOD))((NIGHT))) ?

 
0
  #1
Sep 3rd, 2008
Hi all,

I'm using a common Lisp compiler and I don't know the syntax to get the node "NIGHT" from the list (((GOOD))((NIGHT))). Could someone help me?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: How to get "NIGHT" node from LISP list (((GOOD))((NIGHT))) ?

 
0
  #2
Sep 3rd, 2008
Take it one step at a time with car and cdr:

define xs (((GOOD))((NIGHT)))

car xs --> ((GOOD))
cdr xs --> ((NIGHT))

car (car xs) --> (GOOD)
cdr (car xs) --> ()

etc.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: bicarbonato is an unknown quantity at this point 
Solved Threads: 0
bicarbonato bicarbonato is offline Offline
Newbie Poster

Re: How to get "NIGHT" node from LISP list (((GOOD))((NIGHT))) ?

 
0
  #3
Sep 4th, 2008
It helped me a lot.

Thank you!
--
Visit and help our free dictionary: http://www.vocabulus.110mb.com
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC