Friday, June 27, 2014

Exercism: "Rna Transcription in Clojure"

This is my solution to the Rna Transcription problem in Clojure:

I used a map to look-up the transcription of each nucleotide.

The AssertionError exception was necessary to pass the provided tests. I would have rather used a different exception.

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



After learning some new stuff, I've been able to simplify the code a bit more:

I used the if-let form, def ^:private and the defn- macro in order to improve readability

You can nitpick this new version here.

No comments:

Post a Comment