[racket-dev] [plt] Push #25466: master branch updated

From: Stephen Bloch (bloch at adelphi.edu)
Date: Tue Oct 16 19:55:31 EDT 2012

>> Another data point: If "define/match" expands to a "define" of a procedure
>> that dispatches to a set of implementations based on a pattern-match of
>> actual arguments... then the name is exactly what I'd expect for such a
>> feature in a Scheme dialect.
> 
> That is, in fact, exactly what it does.

Cool!  My students have been writing code that way for years, and I've been telling them "There are languages in which that would work, but Scheme isn't one of them."

(define (swap (make-posn x y))
    (make-posn y x))

Next question: is there a version of this that's simple enough for beginning students to use?


Stephen Bloch
sbloch at adelphi.edu



Posted on the dev mailing list.