TIL

Threading Macros

The threading macro in Clojure provides a more readable way to compose functions together. It's a bit like a Bash pipeline. The following function takes a string, splits on a : and trims the whitespace from the result. The threading macro denoted by -> passes the threaded value as the first...

Logs

2023-06-06

I did a bit more work with Clojure today. My imperative programming habits are still bleeding through. The exercise introduced cond as a sort of case statement for flow control. I wrote a simple cond statement but was getting a bizarre runtime error:

Logs

2023-06-05

I've following the work Exercism has been doing for several years now. I used their product to learn a bit of Elixir and Go a few years back. I got an email from the today promoting a focus on functional programming languages in the month of June. I decided to learn a bit of Clojure, since I've...