~rhcarvalho/+junk/racket

1
2
3
4
5
6
7
#lang racket
;; Report each unique line from stdin
(let ([saw (make-hash)])
  (for ([line (in-lines)])
    (unless (hash-ref saw line #f)
      (displayln line))
    (hash-set! saw line #t)))