simple 'when' macro + fix trans. of branchless if