Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
8
Task/Function-frequency/Racket/function-frequency-1.rkt
Normal file
8
Task/Function-frequency/Racket/function-frequency-1.rkt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#lang racket
|
||||
(require math)
|
||||
(define in (open-input-file "function-frequency.rkt"))
|
||||
(void (read-language in))
|
||||
(define s-exprs (for/list ([s (in-port read in)]) s))
|
||||
(define symbols (filter symbol? (flatten s-exprs)))
|
||||
(define counts (sort (hash->list (samples->hash symbols)) >= #:key cdr))
|
||||
(take counts (min 10 (length counts)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue