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

So, define a closure in terms that someone who has just learned what a variable is can understand.

"Just memorize this syntax and do it" is not allowed.




My issue here is that the for version is pretty much exactly "Just memorize this syntax and do it"


I already did:

> There is a function "each" that applies to arrays. "Each", for each element in the array, binds "elem" to the element value, then executes the body of the code block. The code applies "each" to array "arr" and executes "puts elem" for each element.




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

Search: