Clojure by Example (2015)

I don’t like reading thick O’Reilly books when I start learning new programming languages. Rather, I like starting by writing small and dirty code. If you take this approach, having many simple code examples are extremely helpful because I can find answers to these questions very easily.

How can I define a function?

What’s the syntax for if and else?

Does the language support string interpolation?

What scopes of variables are available?

These are very basic questions, but enough to start hacking with the new languages.

Read in full here:

https://kimh.github.io/clojure-by-example/#about

This thread was posted by one of our members via one of our news source trackers.

3 Likes

Corresponding tweet for this thread:

Share link for this tweet.

1 Like

Relevant not so much to the whole page, but to the snippet shown above: I read something recently, that I can’t find now, about a small set of questions (eleven, I think) to determine the grammar of a human language. It included things like how plurals are formed, whether adjectives come before or after the noun, how questions are asked, etc. etc. etc. Perhaps a similar set of “questions” could be formed for computer languages, whether “how does one do this tiny bit of functionality”, or specs for a tiny application, like an exercise off Exercism.

3 Likes