Created
December 16, 2015 06:34
-
-
Save gugat/210f5be93b162f1f0ebc to your computer and use it in GitHub Desktop.
Find ocurrences of items
This file contains hidden or 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
| (let [my_list '(a b b c a a c) my_set (set my_list)] | |
| (zipmap | |
| my_set | |
| (map | |
| (fn [y] | |
| (count | |
| (filter | |
| (fn [x] (= x y)) my_list | |
| ) | |
| ) | |
| ) my_set | |
| ) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar a la mía pero igual válida 😄
Que viva la programación funcional 🎉