4 ms·
I agree; defining well-named functions seem a superior solution. In Haskell, it would just be: print (intercalate ", " [1..10]) I don't buy natural-language-
by Athas 8y ago
I agree; defining well-named functions seem a superior solution. In Haskell, it would just be:
print (intercalate ", " [1..10])
I don't buy natural-language-ish programming languages. The grammar becomes far too complicated very quickly. A simple but flexible grammar, a la most functional languages, is superior.
- tomp 8y agoI hope you didn't mean to imply that `intercalate` is a _well-named_ function... I've no idea what it means, and even after a dictionary search it's still not obvious to me why you'd ever name a method like this!
- bausshf 8y agoIt's kind of a bad name, but not entirely. This is the definition of intercalate. --- intercalate [in-tur-kuh-leyt] verb (used with object), in·ter·ca·lat·ed, in·ter·ca·lat·ing. 1. to interpolate; interpose. 2. to insert (an extra day, month, etc.) in the calendar.