On Oct 20, 2010, at 3:16 AM, Nikita B. Zuev wrote:

> I'm looking for a way to use Raket's structs in a functional way.
> Example:
> 
> (define-struct person (name age))
> ...
> (define (person-age-set p proc)
>  (make-person (person-name p)
>               (proc (person-age p))))

Matthias has been talking for some time about adding this to the student 
languages; I don't know how far it has progressed.  It should be an easy bit of 
programming; perhaps the hardest question is how to name these "functional 
setters", e.g.

person-age-set
set-person-age (without the !)
person-with-age
..



Stephen Bloch
[email protected]

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to