Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 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)))
|
||||
10
Task/Function-frequency/Racket/function-frequency-2.rkt
Normal file
10
Task/Function-frequency/Racket/function-frequency-2.rkt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
'((define . 4)
|
||||
(counts . 3)
|
||||
(s-exprs . 2)
|
||||
(s . 2)
|
||||
(symbols . 2)
|
||||
(a-program . 2)
|
||||
(filter . 1)
|
||||
(hash->list . 1)
|
||||
(in-port . 1)
|
||||
(sort . 1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue