bookmate game
en
Daniel Higginbotham

Clojure for the Brave and True

Avise-me quando o livro for adicionado
Para ler este livro carregue o arquivo EPUB ou FB2 no Bookmate. Como carrego um livro?
  • Nikita Naumenkofez uma citaçãohá 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çãohá 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çãohá 5 anos
    You can also pass a rest parameter with %&:

    (#(identity %&) 1 "blarg" :yip); => (1 "blarg" :yip)
  • Стас Поздняковfez uma citaçãohá 5 anos
    strange-looking style of writing anonymous functions is made possible by a feature called reader macros.
  • Стас Поздняковfez uma citaçãohá 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çãohá 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çãohá 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çãohá 5 anos
    Clojure automatically returns the last form evaluated.
  • Стас Поздняковfez uma citaçãohá 5 anos
    Clojure on how to associate names with values in a list, map, set, or vector
  • Стас Поздняковfez uma citaçãohá 5 anos
    (defn announce-treasure-location [{:keys [lat lng]}] (println (str "Treasure lat: " lat)) (println (str "Treasure lng: " lng)))
fb2epub
Arraste e solte seus arquivos (não mais do que 5 por vez)