News for hackers. Stuff that matters.
Re:Why I'm Productive in Clojure (2013) by didip on Sunday October 22, 2017 @04:02AM (#15525696)
You just have to indent them the same way you'd indent curly braces.

The harder part about lisp is actually recursion. Surprisingly, there aren't a lot of programmers who can follow recursion naturally.

(loop exists in lisp but recursion seems to be the common idiom)

Re:Why I'm Productive in Clojure (2013) by ZenoArrow on Sunday October 22, 2017 @04:30AM (#15525759)
>"The harder part about lisp is actually recursion. Surprisingly, there aren't a lot of programmers who can follow recursion naturally."

All examples of recursion I've ever seen in Lisp follow a similar structure...

* First section checks if recursion is finished. If so, return final result (or final element of full result if returning a list).

* Second section performs an action or two on the inputs.

* Third section calls the function again with revised inputs.

In many ways it's just a do while loop with different syntax.

Re:Why I'm Productive in Clojure (2013) by xfer on Sunday October 22, 2017 @04:45AM (#15525782)
Not true; loops exist (as a macro) because recursive functions(that naturally correspond to loops and iterations) are harder to read because they hide the logic of termination conditions. Fortunately we are using a powerful language, that lets us transform natural loop syntax to a recursive function.
Re:Why I'm Productive in Clojure (2013) by Sharlin on Sunday October 22, 2017 @06:38AM (#15526078)
In my experience you rarely need recursion in Clojure, to the point that it's unidiomatic to use it. For 95% of your looping needs you use combinators, and for the rest there are the loop macros.
Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @09:52AM (#15526826)
I would say nearly all my loops are either map or reduce. That's it.