diff --git a/exercises/practice/raindrops/.approaches/check-every-possibility/content.md b/exercises/practice/raindrops/.approaches/check-every-possibility/content.md index c6848a86d..abf4eb11c 100644 --- a/exercises/practice/raindrops/.approaches/check-every-possibility/content.md +++ b/exercises/practice/raindrops/.approaches/check-every-possibility/content.md @@ -18,7 +18,7 @@ We could be more verbose in the checks using `and`. ```clojure (and (zero? (rem num 3)) (zero? (rem num 7))) ``` -The return is `"PlingPlong"` only if the number is divisable by 3 and 7 but not by 5. +The return is `"PlingPlong"` only if the number is divisible by 3 and 7 but not by 5. We don't have to worry about the "not by 5" because of the order of operations. We can then use the fact that a number is only divisible by 3 and 7 only if it is divisible by 3 * 7. And so, we can express the above like this: diff --git a/exercises/practice/raindrops/.approaches/conditional-thread/content.md b/exercises/practice/raindrops/.approaches/conditional-thread/content.md index 4ce256a91..f63437cea 100644 --- a/exercises/practice/raindrops/.approaches/conditional-thread/content.md +++ b/exercises/practice/raindrops/.approaches/conditional-thread/content.md @@ -9,8 +9,8 @@ :always (or (str number)))) ``` -Unlike `cond`, the matching condition doesn't stop evaluation of the further conditions. -Instead, every matched condition leads to an operation on a value output of which is passed down to the next matching condition. +Unlike `cond`, the matching condition doesn't stop the evaluation of the further conditions. +Instead, every matched condition leads to an operation on a value with the output passed to the next operation dictated by the next matching condition. This allows for very concise code that behaves just like the [step by step approach][step-by-step]. [step-by-step]: https://exercism.org/tracks/clojure/exercises/raindrops/approaches/step-by-step \ No newline at end of file diff --git a/exercises/practice/raindrops/.approaches/step-by-step/content.md b/exercises/practice/raindrops/.approaches/step-by-step/content.md index 03513254d..ac55498bb 100644 --- a/exercises/practice/raindrops/.approaches/step-by-step/content.md +++ b/exercises/practice/raindrops/.approaches/step-by-step/content.md @@ -9,8 +9,8 @@ (if (empty? sound) (str num) sound))) ``` -In the above example the individual sounds of rain are calculated separately and then added to make up the overall sound. -Then we can use the bindings created by `let` to check if the `sound` is empty and return either the sound or the nubmer. +In the above example, the individual sounds of rain are calculated separately and then added to make up the overall sound. +Then we can use the bindings created by `let` to check if the `sound` is empty and return either the sound or the number. A variant of this approach can use the thread first macro `->` and private functions. @@ -28,4 +28,4 @@ A variant of this approach can use the thread first macro `->` and private funct sound)) ``` -Using the thread first macro makes the `convert` function simpler if not clearer, but it comes at the cost of extra complexity in the `pling`, `plang`, `plong` and `sound` functions. \ No newline at end of file +Using the thread first macro makes the `convert` function simple, if not clearer, but it comes at the cost of extra complexity in the `pling`, `plang`, `plong` and `sound` functions. \ No newline at end of file