On Wed, May 26, 2010 at 12:34 PM, Jay McCarthy <jay.mccar...@gmail.com> wrote:
> And I would recommend using hash-ref! to save a line.

#lang racket
;; Report each unique line from stdin:
(let ([saw (make-hash)])
  (for ([line (in-lines)])
    (hash-ref! saw line
      (λ () (displayln line)))))

Slick.
-- 
sam th
sa...@ccs.neu.edu
_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to