Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>"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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: