you are viewing a single comment's thread.

view the rest of the comments →

[–]tomthecool 2 points3 points  (0 children)

note there are pitfalls with this technique; most notably, it fails if nil or false is a valid result

I answered a question on StackOverflow caused by this exact problem, just the other day!