left x = (x, 0); right x = (0, x); pure = right; bind (l,0) f = (l,0); bind (0,r) f = f r; mul a b = code mul a b; sub a b = code sub a b; mulM x y = right (mul x y); subM x y = right (sub x y); main = bind (bind (pure 5) (mulM 10)) (subM 10);