[racket] match in Advanced Student?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Oct 31 22:26:58 EDT 2011

One of the branches of the pattern language is

|	 	(struct id (pattern ...))

Your pattern should be

(struct color (r g b))

On Mon, Oct 31, 2011 at 8:21 PM, Adam Shaw <adamshaw at cs.uchicago.edu> wrote:
> Since pattern matching has been a topic of discussion lately -- I'm trying
> to get simple pattern matching to work in Adv. Student -- for example this
> expression:
> (match (make-color 1 2 3)
>   [(make-color r g b) (* r g b)])
> gets this response
>   match: expected a pattern, but found a part
> I would appreciate an explanation or a pointer to how I can understand this.
> Thanks.
>  - Adam
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.