Skip to content

Coding Challenges for Clojure

Clojure coding challenges

Coding challenges are an excellent way to start learning a new language. The challenges allow you to focus on the language and not be concerned about the more general engineering aspects of software development.

Challenges are there to explore a language and practice your understanding of how to assemble working code.

Try different approaches to solving each challenges to broaden your learning.

Exercism.io and 4Ever-Clojure are highly recommended starting point for learning Clojure.

Practicalli Challenges

Challenge that can be solved in a few hours or less. Use a Clojure REPL connected editor to help solve these challenges.

Approach to solving challenges

Take a few minutes to digest the description of the challenge and make notes.

Identify the simplest possible thing to do, solving the problem in many small pieces which encourages experimentation

  • experiment, write code and evaluate to see what it does (optionally create a comment with the result)
  • use a rich comment (comment ,,,) to capture multiple ideas and designs, even failed experiments can be useful (separates experiments from working code)
  • continually evaluate code as expressions are written, to ensure their behaviour is understood (try different argument values for functions)
  • try different shapes of data
  • transform data shapes to keep function definitions simpler

Once there is a working solution, refactor or try different approaches and evaluate the merit of alternative solutions

Challenge websites

A local Clojure development environment supports solving challenges

Challenge website Description Requirements
4Ever-Clojure Learning the core functions of the Clojure language Web Browser
Exercism Coding exercises with mentor support Web Browser & Exercim CLI
ClojureScript Koans Interactive exercises in a web browser Web Browser
Advent of Code Yearly coding challenge with a seasonal theme Clojure aware editor
CodeWars Mostly math-based coding challenges with Clojure variants Web Browser