[plt-scheme] struct-copy
#lang scheme
(define-struct posn (x y) #:transparent)
(define p0 (make-posn 0 0))
(define p1
(struct-copy posn p0
[x 5]))
p0
p1
=>
#(struct:posn 0 0)
#(struct:posn 5 0)
On Tue, Mar 24, 2009 at 7:36 PM, Jay Riddle <jcriddle4 at yahoo.com> wrote:
>
>
> Does someone have a simple example of using struct-copy?
>
> --JayR
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay
"The glory of God is Intelligence" - D&C 93