foo x = yes x x where yes x y = if a then b else if c then d else e