RSS Forums RSS
Please support our Legacy and Other Languages advertiser: Programming Forums

Scheme Help

Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,884
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 13
Solved Threads: 197
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Scheme Help

  #10  
Nov 16th, 2007
Of course. You'll need to read up on recursion.

There is a basic principle: if you have a list
(a b c d)
(which, if you remember, is really:
(a . (b . (c . (d . ()))))
and if you can do something to the car of the list (or a) and the cdr of the list (that is, the rest of the list: (b c d)),
then you can do something to the whole list.

Remember, your list is a list of 'card's. So you'll have to use the card ADT to get the rank of each card and compare its value.

Hope this gets you started. Using scheme (and other functional languages) require you to think pretty hard.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:53 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC