Created
August 27, 2011 21:31
-
-
Save samth/1175887 to your computer and use it in GitHub Desktop.
Python Challenge problem #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang at-exp racket | |
(define str | |
@string-append||{ | |
;; giant wall of characters goes here | |
}||) | |
(define (frequencies l) | |
(for/fold ([h (hash)]) ([i l]) (hash-update h i add1 0))) | |
(define h (frequencies str)) | |
(apply string | |
(for/list ([i str] #:when (= (hash-ref h i) 1)) i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment