This is also possible in common lisp, however, there seems to be a lot more use of looping in CL than other dialects... Perhaps for performance reasons.
Suppose, for example* , that `range' conses up a list of START to END numbers, then sums that list. That's a bunch of memory allocation then a reduction. It may be elegant, but looping over the numbers and accumulating the result would be faster and use less memory.
I'm no expert, but it seems that a lot of production common lisp code will have gone through a few cycles of optimisation and arrived at a point of resembling imperative procedures. As a result common lisp teaches iteration (skipping over the need to rediscover the production tricks) while scheme teaches recursion.
* That's not to say that this form couldn't be implemented in terms of looping.
But it's a vital point that 'range' doesn't allocate the whole list - it generates the head of a lazy seq. So the Clojure form CAN be compiled to be nearly as fast as the CL one.
Why do optimization by hand when you can write something conceptually cleaner and let the compiler do it for you?
If you look at CLtL appendices A and B, you'll see that Common Lisp was originally going to come with Rich Waters' SERIES (http://series.sourceforge.net/), which is like lazy iterators/stream processing. At the time there were plans for doing all kinds of neat optimizations, including what's now known as map fusion in Haskell-land.
Suppose, for example* , that `range' conses up a list of START to END numbers, then sums that list. That's a bunch of memory allocation then a reduction. It may be elegant, but looping over the numbers and accumulating the result would be faster and use less memory.
I'm no expert, but it seems that a lot of production common lisp code will have gone through a few cycles of optimisation and arrived at a point of resembling imperative procedures. As a result common lisp teaches iteration (skipping over the need to rediscover the production tricks) while scheme teaches recursion.
* That's not to say that this form couldn't be implemented in terms of looping.