Codebase list ohcount / 420c4794-75b8-4551-a2c5-42f5fb1d3fbf/main test / src_dir / example.rkt
420c4794-75b8-4551-a2c5-42f5fb1d3fbf/main

Tree @420c4794-75b8-4551-a2c5-42f5fb1d3fbf/main (Download .tar.gz)

example.rkt @420c4794-75b8-4551-a2c5-42f5fb1d3fbf/mainraw · history · blame

;; language declaration commented out until someone extends the
;; parser to support it:

;; #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)))