Re:Ask HN: How do you explain closures?
by rleisti on Friday November 06, 2009 @12:10PM
(#926388)
Doh!
It would have made more sense if I had some other piece of information to inject in, like if you had a database reference that needed to be passed in to the Delete() method.
Re:Ask HN: How do you explain closures?
by tome on Friday November 06, 2009 @12:46PM
(#926473)
Yup, makes more sense now! This is a good example, I think, to give to people who are used to objects being used for everything. Nice, clean, functional syntax.
It would have made more sense if I had some other piece of information to inject in, like if you had a database reference that needed to be passed in to the Delete() method.
Then:
Vs. EDIT: fixed