clojure_functions
Writing implementations of some of the core functions of a language can be a great way to really get to understand the language.
Included here are implementations of reduce
, count
, filter
, map
, and pmap
. The implementations are only models of the core functions, and are not intended to provide the same efficiency benefits that the core functions offer.
There are both unit and property-based tests to demonstrate that the functions behave as desired. The unit tests can be run with lein spec
, and the property-based tests with lein test
.
For further details, see Understanding Core Clojure Functions and Property-Based Testing in Clojure.