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

Make it even more ridiculous and wrap every branch in a lambda function, then do

    test[true]()


That would only evaluate the original [true] key, though, right?


No, `test[true]` will be reassigned to the given function each time the condition evaluates to true. Calling `test[true]()` will execute that given function.




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

Search: