Busca
Biblioteca
Mais
▼
Estantes
Resgatar o código promocional
7 dias grátis
Entrar
pt
English
Русский
Español
Dansk
Türkçe
Bahasa Indonesia
Svenska
Deutsch
Nederlands
Українська
Português
Srpski i Crnogorski
Български
Magyar
Hrvatski
en
Leia em nossos aplicativos:
iOS
·
Android
Daniel Higginbotham
Clojure for the Brave and True
Avise-me quando o livro for adicionado
Impressão
Adicionar à estante
Já lido
Relatar um erro no livro
Compartilhar
Facebook
Twitter
Copiar link
Para ler este livro carregue o arquivo EPUB ou FB2 no Bookmate.
Como carrego um livro?
Buscar no Google
Sobre
Citações
31
Leitores
6
Nas estantes
Nikita Naumenko
fez uma citação
há 5 anos
It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.
—Alan Perlis
Стас Поздняков
fez uma citação
há 5 anos
let creates a new scope in which the name x is bound to the value 1. I think of scope as
Стас Поздняков
fez uma citação
há 5 anos
You can also pass a rest parameter with %&:
(#(identity %&) 1 "blarg" :yip); => (1 "blarg" :yip)
Стас Поздняков
fez uma citação
há 5 anos
strange-looking style of writing anonymous functions is made possible by a feature called reader macros.
Стас Поздняков
fez uma citação
há 5 anos
Clojure also offers another, more compact way to create anonymous functions. Here’s what an anonymous function looks like:
#(* % 3)
Whoa, that looks weird. Go ahead and apply that weird-looking function:
(#(* % 3) 8); => 24
Стас Поздняков
fez uma citação
há 5 anos
Clojure also offers another, more compact way to create anonymous functions. Here’s what an anonymous function looks like:
#(* % 3)
Стас Поздняков
fez uma citação
há 5 anos
fact, you’ll use anonymous functions all the time. How mysterious! You create anonymous functions in two ways. The first is to use the fn form:
(fn [param-list] function body)
Стас Поздняков
fez uma citação
há 5 anos
Clojure automatically returns the last form evaluated.
Стас Поздняков
fez uma citação
há 5 anos
Clojure on how to associate names with values in a list, map, set, or vector
Стас Поздняков
fez uma citação
há 5 anos
(defn announce-treasure-location [{:keys [lat lng]}] (println (str "Treasure lat: " lat)) (println (str "Treasure lng: " lng)))
Não dê um livro. Dê uma biblioteca!
Dê uma assinatura Bookmate →
fb2
epub
Arraste e solte seus arquivos (não mais do que 5 por vez)