x /. 0 = None x /. y = Some (x / y)