Search
Books
Audiobooks
Comics
More
▼
Bookshelves
Redeem code
7 days for free
Log in
en
English
Русский
Español
Dansk
Türkçe
Bahasa Indonesia
Svenska
Deutsch
Nederlands
Українська
Português
Srpski i Crnogorski
Български
Magyar
Hrvatski
Read in our apps:
iOS
·
Android
Daniel Higginbotham
Clojure for the Brave and True
Notify me when the book’s added
Impression
Add to shelf
Already read
Report an error in the book
Share
Facebook
Twitter
Copy link
To read this book, upload an EPUB or FB2 file to Bookmate.
How do I upload a book?
Search on Google
About
Quotes
31
Readers
6
On the bookshelves
Nikita Naumenko
has quoted
5 years ago
It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.
—Alan Perlis
Стас Поздняков
has quoted
5 years ago
let creates a new scope in which the name x is bound to the value 1. I think of scope as
Стас Поздняков
has quoted
5 years ago
You can also pass a rest parameter with %&:
(#(identity %&) 1 "blarg" :yip); => (1 "blarg" :yip)
Стас Поздняков
has quoted
5 years ago
strange-looking style of writing anonymous functions is made possible by a feature called reader macros.
Стас Поздняков
has quoted
5 years ago
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
Стас Поздняков
has quoted
5 years ago
Clojure also offers another, more compact way to create anonymous functions. Here’s what an anonymous function looks like:
#(* % 3)
Стас Поздняков
has quoted
5 years ago
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)
Стас Поздняков
has quoted
5 years ago
Clojure automatically returns the last form evaluated.
Стас Поздняков
has quoted
5 years ago
Clojure on how to associate names with values in a list, map, set, or vector
Стас Поздняков
has quoted
5 years ago
(defn announce-treasure-location [{:keys [lat lng]}] (println (str "Treasure lat: " lat)) (println (str "Treasure lng: " lng)))
Don’t give a book. Give a library.
Give a Bookmate subscription →
fb2
epub
Drag & drop your files (not more than 5 at once)