A small note on the capitalize-n-stretch function.
Since comp will apply the right-most function first and continues right-to-left, I should have defined it like this:
(def capitalize-n-stretch (comp stretch capitalize))
In that case, our functions are commutative so the result is the same, but, for example, a reverse-n-capitalize function would return different results depending on ‘comp’ function argument order.
((comp capitalize reverse) “abcd”) >”Dcba”
((comp reverse capitalize) “abcd”) >”dcbA”