Given a string $s$ over some alphabet, I'd like to use the proper nomenclature/notation for the operation/function $f$ which inflates $s$ by independently duplicating each of its characters.
For instance: $$ f(abc) = aabbcc$$ or, more generally, a second argument could be provided to specify the number of copies: $$ f(xy,4) = xxxxyyyy$$
This should be embarassingly standard, so don't hesitate to shoot me in your response! (on the other hand, it is always difficult to search for something you cannot name, but I wouldn't accept such a lame excuse from my students, so...)
concatMap (replicate 3)
(whereconcatMap
is the flipped bind for the list monad). $\endgroup$