I have a boolean flag based on which I want to perform a 1 line functionality say increment a variable or call an object\'s method etc. What\'s the best way to do this with