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

One simple use I like a lot is using tail recursion as a replacement for gotos. Its great for state machines and other "algorithmy" tasks. You get the benefits of gotos (the code you write is the same as the code you think) but the end result is actually manageable.

http://www.lua.org/pil/6.3.html

Lambda the ultiamte goto: http://library.readscheme.org/page1.html



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

Search: