Example one: do_stuff_to_the_thing(x); if(x==y){ do_more_stuff_to_the_thing(x); } Example two: if(do_stuff_to_the_thing(x)){ if(x==y){ do_more_stuff_to_the_thing(x); } }