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

Some times in clojure I've found it easier to express a sequence recursively, rather than iteratively. Using lazy-seq is not only braindead simple for this - just wrap the whole function in it, it is the only way to keep your stack use from growing on the recursive calls. I haven't compared the performance of this to eager evaluation but I'd guess it isn't that poor.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: