Skip to content

Instantly share code, notes, and snippets.

@samth
Created Aug 27, 2011
Embed
What would you like to do?
Python Challenge problem #2
#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