Clean Coder Blog
This expression: (1 2) represents the list containing the integers 1 and 2 in that order. If you want an empty list, that’s just (). And the list of the first five letters of the alphabet is just (\a \b \c \d \e).
So let’s learn just a little bit of clojure. This expression: (1 2) represents the list containing the integers 1 and 2 in that order. If you want an empty list, that’s just () . And the list of the first five letters of the alphabet is just (\a \b \c \d \e) . Now you know a lot about the syntax of clojure. Perhaps you think there’s a lot missing. Well, there are a few things missing; but far fewer than you’d think. You might be wondering how you add two numbers. That’s easy, that’s just (+ 1 2) . As it happens that’s also just the list of the function named + followed by a 1 and a 2. You see,
Explore this link on the map →saved by
related reading
- The Clojure Style Guideguide.clojure.style
- Good examples of Clojure macros usage which demonstrate advantages of the language over the mainstream? - Stack Overflowstackoverflow.com
- Val on Programming: What makes a good REPL?vvvvalvalval.github.io
- Starting Out - Learn You a Haskell for Great Good!learnyouahaskell.github.io
- CSC 151 - List basicseikmeier.sites.grinnell.edu
- CSC 151 - Recursion over Numberseikmeier.sites.grinnell.edu
- Lambda calculus - Wikipediaen.wikipedia.org
- CSC 151 - Transforming listseikmeier.sites.grinnell.edu
- CSC 151 - Higher-order design, recursive and othereikmeier.sites.grinnell.edu
- CSC 151 - The "big three" list operationseikmeier.sites.grinnell.edu
- CSC 151 - Recursion Over Listseikmeier.sites.grinnell.edu
- Structure and Interpretation of Computer Programsmitp-content-server.mit.edu