3 ms·
I get what you are saying, but I think the author was not trying to do that. The example was meant to show the imperative approach which is not necessarily the
by specialp 9y ago
I get what you are saying, but I think the author was not trying to do that.
The example was meant to show the imperative approach which is not necessarily the best approach in Python either. They said so much in the paragraph before the example. Yes, Python was used and is used often to show imperative examples. Python is used in these examples because it is also dynamically typed, and understood by a lot of programmers. The reason it is not given in Clojure is that it is pretty hard to make imperative examples in Clojure.
Also, coming from Ruby, the way the "process" function was posted is unfortunately the way many Ruby programmers would do it despite access to filter, map and blocks.