Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
reikonomusha
· 14y ago · 0 comments
Make it even more ridiculous and wrap every branch in a lambda function, then do
test[true]()
Comments
[–]
mahcuz
14y ago
That would only evaluate the original [true] key, though, right?
[–]
tgasson
14y ago
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.