A suggestion for testing style in Clojure

Getting a test to fail is one thing; getting it to express why it failed is another.Clojure.test provides an assertion macro: is (deftest “my-function”   (testing “some requirement”    (is (something-that-evaluates-to-bool (arg1) (arg2))     “Message to print when it’s false”))) When this assertion fails, in addition to the message, “expected” and “actual” results print. The is macro tries to … Read moreA suggestion for testing style in Clojure

Left to right, top to bottom

TL;DR – Clojure’s threading macro keeps code in a legible order, and it’s more extensible than methods. When we create methods in classes, we like that we’re grouping operations with related data. It’s a useful organizational scheme. There’s another reason to like methods: they put the code in an order that’s easy to read. In … Read moreLeft to right, top to bottom