Hacker News new | past | comments | ask | show | jobs | submit login

That's any language that has scoping. I think what you're searching for is something like using lambda {} that captures the outer scope.

I used lambda actually to introduce some middle schoolers to capturing behavior in Ruby. It worked well.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: