Skip to content

Instantly share code, notes, and snippets.

Created Aug 27, 2011
What would you like to do?
Python Challenge problem #2
#lang at-exp racket
(define str
;; 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