Created
October 16, 2015 20:49
-
-
Save nez/773260e6553b3f3cea9b to your computer and use it in GitHub Desktop.
Clojure para bobos
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
Para instalar lein: leiningen.org | |
Para probar desde internet: tryclj.com | |
doc source | |
defn fn def #() | |
aridades multiples | |
& apply | |
[] {} | |
map | |
filter | |
Los de lisp se enojan de que le digamos un "lisp moderno" | |
Let Over Lambda, lazy | |
http://clojure.org/cheatsheet | |
Seq in, Seq out | |
Mito: muchos parentesis | |
(defn fshht! [& body] | |
(eval | |
(read-string | |
(apply str (flatten ["(" body ")"]))))) | |
Analizando CKAN | |
http://fractal.ai/#/repl | |
(keys (first (data "recursos"))) | |
(distinct (map :format (data "recursos"))) | |
Flow control | |
(if (= 1 1) | |
"TRU" | |
"FALS") | |
(loop [nuevos [1 2 3] viejos []] | |
(if (empty? nuevos) | |
viejos | |
(recur (rest nuevos) | |
(conj viejos (first nuevos))))) | |
Next steps: | |
Clojure Koans https://github.com/functional-koans/clojure-koans | |
Usando el endpoint: http://fractal-api.fractal.ai?expr=[EXPRESION] | |
* Usar (find-db "recursos") para la lista de recursos, (find-db "datos-abiertos") para los conjuntos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment