Re: copying arrays
- From: Dan Bensen <randomgeek@xxxxxxxxxxxxxx>
- Date: Sun, 29 Apr 2007 01:22:56 -0500
Alan Manuel K. Gloria wrote:
In my experience it's quite rare to have to have to *copy* a
sequence. If you're manipulating an array, why would you want to
retain the previous version?
In a game, you might want to pass the state of the game
(e.g. the board in a board game) to a computer player
so it can decide what it wants to do. The safe way to do that
would be to pass the player a copy, so the player doesn't
corrupt the game. Often the player will destructively modify
the board, but undo all its changes at the end. With a copy,
you can also check the player for correctness by comparing
the final state of the player's copy with the original board.
--
Dan
www.prairienet.org/~dsb/
.
- Follow-Ups:
- Re: copying arrays
- From: Kent M Pitman
- Re: copying arrays
- References:
- copying arrays
- From: Q
- Re: copying arrays
- From: Alan Manuel K. Gloria
- copying arrays
- Prev by Date: Re: Why doesn't Lisp automatically differentiate functions and macros?
- Next by Date: like linj
- Previous by thread: Re: copying arrays
- Next by thread: Re: copying arrays
- Index(es):
Relevant Pages
|