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

That's true, but the modifier character* (not more than one) is consistent: & says "take the named method, call to_proc on it, and pass it in as a block". Since many methods allow blocks to be passed to them, this kind of code is useful and well-understood, I think.

I want to note that the &:even? idiom is only used in the simplest cases.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: