[racket] Re-usable C-like input syntax

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Tue May 21 16:51:55 EDT 2013

On 05/21/2013 02:45 PM, David Bremner wrote:
> Tom Schouten <tom at zwizwa.be> writes:
>
>> Interesting, but I'm tied to Racket at this point.
>>
> I'd have a look at "Honu" by Jon Rafkind if you haven't seen it
> already. It adds an algol like syntax on top of racket, 
>
> It looks a bit javascriptish, I guess
>
>
> function quadratic(a, b, c) {
>     var discriminant = sqr(b) - 4 * a * c
>     if (discriminant < 0) {
> 	[]
>     } else if (discriminant == 0) {
> 	[-b / (2 * a)]
>     } else {
> 	[-b / (2 * a), b / (2 * a)]
>     }
> }

[(-b + discriminant) / (2 *a), (-b - discriminant) / (2 * a)]

I know the paper is wrong.. :(

Posted on the users mailing list.