Functional Programming Archive

Note to self: Clojure Transducers

The code presented here is available on github. I’ve been trying to get my head around (and develop an intuition for) Clojure’s Transducers. During that process, I’ve been playing around with them a bit. These are some of the examples that I’ve worked out. I hope this will

Java Lambdas

This shall be a brief overview over Java Lambdas. I will try to make a comparison to anonymous functions concepts how they are being used in other languages. As a comparison language, I choose Scala, since it is statically typed (just like Java is). However, Scala provides type inference, which

Tail Recursive Tree Traversal

Once in a while you may be facing the situation that requires you to walk a tree, do some kind of processing on each node and collect a result (or do other things). In case the tree is arbitrarily large and also arbitrarily branched, you have generally two options (as