Re: [racket] Problem with case

2012-09-18 Thread Eli Barzilay
A few minutes ago, Jon Zeppieri wrote: > (I assume the nightly builds on racket-lang.org are from the > stable branch?) No -- the stable branch corresponds to the released versions, so it's a convenient way to get to the "most recently released" point. -- ((lambda (x) (x x)) (lambda (x

Re: [racket] Problem with case

2012-09-18 Thread Jon Zeppieri
On Tue, Sep 18, 2012 at 5:29 PM, Danny Yoo wrote: > > > > > I'd like to see a discussion of the tradeoffs between cond & case & match > > and how each is best used. 1. Use 'cond' where you would use 'if...else if...else' in a C-like language. It's just a multi-way if: (cond [(string? value)

Re: [racket] Problem with case

2012-09-18 Thread Danny Yoo
> > I'd like to see a discussion of the tradeoffs between cond & case & match > and how each is best used. Hi Joe, I treat 'cond' as the general, all-purpose conditional branching thing, and it's my primary tool. I use the other two if the conditions I'm testing against fit their shapes. If I'

Re: [racket] Problem with case

2012-09-18 Thread Joe Gilray
Thanks for the question, Kieron. It got me to look up case and think a little about its usage. I'd like to see a discussion of the tradeoffs between cond & case & match and how each is best used. Thanks, -joe On Tue, Sep 18, 2012 at 7:07 AM, Kieron Hardy wrote: > Thanks for the info guys, now

Re: [racket] Problem with case

2012-09-18 Thread Kieron Hardy
Thanks for the info guys, now I understand what's going on. Cheers, Kieron Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Problem with case

2012-09-17 Thread Jon Zeppieri
On Mon, Sep 17, 2012 at 7:15 PM, David Van Horn wrote: > On 9/17/12 7:11 PM, Jon Zeppieri wrote: > >> The fact that the first one works at all should probably be considered a >> bug. The syntax of case here: >> >> http://docs.racket-lang.org/**reference/case.html?q=case#(** >> form._((lib._racket/

Re: [racket] Problem with case

2012-09-17 Thread David Van Horn
On 9/17/12 7:11 PM, Jon Zeppieri wrote: The fact that the first one works at all should probably be considered a bug. The syntax of case here: http://docs.racket-lang.org/reference/case.html?q=case#(form._((lib._racket/private/more-scheme..rkt)._case)) dictates that the constants in a case clau

Re: [racket] Problem with case

2012-09-17 Thread J. Ian Johnson
" Sent: Monday, September 17, 2012 7:11:03 PM GMT -05:00 US/Canada Eastern Subject: Re: [racket] Problem with case The fact that the first one works at all should probably be considered a bug. The syntax of case here: http://docs.racket-lang.org/reference/case.html?q=case#(form._((li

Re: [racket] Problem with case

2012-09-17 Thread Jon Zeppieri
The fact that the first one works at all should probably be considered a bug. The syntax of case here: http://docs.racket-lang.org/reference/case.html?q=case#(form._((lib._racket/private/more-scheme..rkt)._case)) dictates that the constants in a case clause be parenthesized. The more important i

Re: [racket] Problem with case

2012-09-17 Thread David Van Horn
On 9/17/12 6:47 PM, Kieron Hardy wrote: Hi all, Can anyone explain why the first function below selects 'x1-case as expected but the second fails to select 'x2-case? Am I expecting something to happen that shouldn't? Thanks, Kieron. #lang racket (case 'a ['a 'x1-case] ['b 'x1-c