[racket] Racket v5.0

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jun 8 02:22:01 EDT 2010

On Jun  8, Madoka Machitani wrote:
> Congrats to the official release of Racket!!
> That said, I think I have spotted a bug in the example program of the
> Racket website:
> #lang racket ; Simple web scraper
> (require net/url net/uri-codec)
> (define (let-me-google-that-for-you str)
>   (let* ([g "http://www.google.com/search?q="]
>          [u (string-append g (uri-encode str))]
>          [rx #rx"(?<=<h3 class=\"r\">).*?(?=</h3>)"])
>     (regexp-match* rx (get-pure-port (string->url g)))))
> The last occurence of `g' above has to be replaced with `u', right?

You're right -- fixed.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.