[plt-scheme] Fun with Unicode and delimited continuations

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Jun 3 08:07:29 EDT 2010

This must be the most fun (and useless) use of delimited continuations I have seen since 1984. 

Eli, I wonder how NUPRL deals with the quadratic formula? Or what is the logical content of the below? 


On Jun 3, 2010, at 12:06 AM, Doug Orleans wrote:

> Posted without comment:
> 
> (define √ sqrt)
> (define ² sqr)
> 
> (require scheme/control)
> 
> (define (± x y)
>  (shift k (values (k (+ x y)) (k (- x y)))))
> 
> (define (quadratic-formula-roots a b c)
>  (reset (/ (± (- b) (√ (- (² b) (* 4 a c))))
> 	    (* 2 a))))
> 
> 
> --dougorleans at gmail.com
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.