A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Learning Clojure

Learning Clojure

Clojure is a functional dynamically-typed language. While it compiles to bytecode and runs on the Java Virtual Machine, its approach is completely different from Java's: it's related to Lisp. It also transpiles to JavaScript - Clojurescript, and compiles to .NET bytecode. This focus in intended for developers who have a background in Object-Oriented languages and who want to start their Clojure journey.

8 posts
Aug 19, 2018 clojure functional programming

Decoding Clojure code, getting your feet wet

Recently, I had some some fun writing functional Kotlin to solve the FizzBuzz test. I asked for some feedback, and one of the answer I received was in Clojure: In Clojure there's the classic way, with condp and mod. There's also another way using cycle that I saw some years ago. The range and the 2 cycles will generate the fizz & buzz, the rest just decides what to print.Will be easier for you with syntax highlighting -> screenshots pic.twitter.

Nicolas Fränkel
Sep 23, 2018 clojure specifications type

Learning Clojure: coping with dynamic typing

This is the 2nd post in the Learning Clojure focus series. My new position requires me to get familiar with the Clojure language. In intend to document what I learn in a series of posts, to serve as my personal reference notes. As a side-effect, I hope it will also be beneficial to others who want to take the same path.

Nicolas Fränkel
Sep 30, 2018 clojure arrow threading

Learning Clojure: the arrow and doto macros

This is the 3rd post in the Learning Clojure focus series. For me, learning a new language is like getting into the sea: one toe at a time. This week, we will have a look at some powerful macros.

Nicolas Fränkel
Oct 7, 2018 clojure dispatch defmulti defmethod

Learning Clojure: dynamic dispatch

This is the 4th post in the Learning Clojure focus series. A common pattern in software development is the dynamic dispatching (or routing) table. The table is responsible for returning the relevant output for a specific input. In the Object-Oriented programming world, the object model would look something like the following.

Nicolas Fränkel
Oct 21, 2018 clojure dependent types programming by contract

Learning Clojure: dependent types and contract-based programming

This is the 5th post in the Learning Clojure focus series. While describing how to cope with dynamic typing, we used the spec library. The library is not a true replacement for types - checks are executed at runtime instead of compile-time. On the flip side, it can go further than mere types, including emulating dependent types and programming-by-contract.

Nicolas Fränkel
Nov 4, 2018 clojure sequence stream

Learning Clojure: comparing with Java streams

This is the 6th post in the Learning Clojure focus series. In general, one learns by comparing to what one already knows: I’m learning Clojure in that way. Coming from a Java background, I naturally want to use streaming features. So, what would be the Clojure counterparts of Java’s functions filter(), map(), etc.?

Nicolas Fränkel
Nov 18, 2018 clojure sequence stream

Feedback on Learning Clojure: comparing with Java streams

This is the 7th post in the Learning Clojure focus series. Coming from a Java background, I’m currently trying to learn the Clojure programming language, with the help of online resources and mentorship. Some weeks ago, I tried to wire things together by trying to find equivalent methods to those available in Java streams. While I managed to get things working, writing working code and writing idiomatic code are two very different things.

Nicolas Fränkel
Jan 13, 2019 clojure transformation reducer transducer

Learning Clojure: transducers

This is the 8th post in the Learning Clojure focus series. This week, the subject is transducers. But before diving into that subject, we first need to talk more about reducers. If you have some experience in Java 8, you probably already know about the Stream.reduce() function. It’s available in three different flavors.

Nicolas Fränkel
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts