[racket-dev] define-wish and a call for assistance

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Mon Feb 21 08:33:46 EST 2011

On Feb 21, 2011, at 8:04 AM, Kathryn Gray <kathryn.gray at cl.cam.ac.uk> wrote:

> I've added a preliminary version of define-wish to the teaching languages and the test-engine but it doesn't presently do everything that was discussed/requested in the original conversation. And I don't know how to extend it to support those features.
> 
> So can someone with more experience in developing functions for the teaching languages assist?
> 
> (define-wish n) presently provides the programmer with a function, n, of arity one (that raises an exception about wishes when called). I would like this function to be of variable arity, but I have not determined how to do this.

Yes: ideally one would write
(define-wish (f x y z))
and it would define a 3-parameter function named f, whose arity would be enforced by Check Syntax and which would raise an appropriate exception when called.

> 
> I would also like the test-engine to be able to report every wished for function, whether or not it's called.

Good point.

One of these days I've GOT to sit down and learn to write macros....



Stephen Bloch
sbloch at adelphi.edu


Posted on the dev mailing list.