Referential Transparency and Exceptions

Referential transparency ("RT") is a contract in functional programming which assures that the result of a function call returns always the same value for a given input. Any side-effect will break this contract, therefore referential transparency requires you to avoid side-effects even in failure handling. The most concrete example of referential transparency is the functions [...]

Continue reading →

Setting up your environment for scripting with Clojure

After you step into the Clojure world, an another question you may ask yourself is how you can run the Clojure files just like any other script files (as if they're written in Bash, Perl, Python, etc.) without creating any Leiningen project ? The plugin lein-exec allows you to run your Clojure files without compiling [...]

Continue reading →