Thursday, July 3, 2014

Exercism: "Grade School in Clojure"

This is my solution to the Grade School problem in Clojure:

The first working version:


Trying to improve its readability I introduced two local helpers in the sorted function:
sort-by-grades and sort-students-by-name.

This is the resulting version:


Finally, I experimented with the -> macro to see its effect on readability and got to this last version:


I think the -> macro is great.

You can nitpick my solution here or see all the exercises I've done so far in this repository.

No comments:

Post a Comment