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.
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. I was fortunate to have a good degree of feedback from dif
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.?
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.
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.
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. There are already a multitude of great tutorials available: hence, each post will focus on a specific theme, that is specific to Clojure considering that most of my experience com
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.com/wOPJD0BpGM— Alexandre Gri