Is there any great reason to use an anonymous function here? Why not just do the logic in the if statement. Its equivalent, it just seems more complicated, but maybe i'm missing something.