match is far more expressive than case. Think of 

> (match 3 [(? even? x) (+ x 1)][(? odd? x) (- x 1)])

But of course you’re paying for in terms of run-time cost. 

Engineering is a trade-off game. 



> On Jun 3, 2016, at 10:10 AM, Gerald Pipes <gerald_pi...@student.uml.edu> 
> wrote:
> 
> I have been recently using match a lot and I was wondering what was the main 
> benefit of using case instead of match?  It seems as though match has the 
> distribution on a single val-exp except match allows for the pattern matching 
> and case just uses equal?.  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to