Scheme redefine a list...

Posted by octavio on Stack Overflow See other posts from Stack Overflow or by octavio
Published on 2010-03-31T21:01:03Z Indexed on 2010/03/31 21:03 UTC
Read the original article Hit count: 457

Filed under:
|
|

I have a list called hand and another one called deck, the main goal here is to take the first card (or element ) in the list deck and put it in the list hand when i call the fnction draw...

(draw hand deck) (2 C) (draw hand deck) (2 C) (3 H) (draw hand deck) (2 C) (3 H) (K D)

but everytime i call it the hand never changes value... I'm clueless is there a way like in O-Object to change the content of hand permenantly?

and i initialy define hand empty because the player has no card to start.

(define hand '())

© Stack Overflow or respective owner

Related posts about Scheme

Related posts about blackjack