Task

Write a function to detect a   divide by zero error   without checking if the denominator is zero.




open core number
 
x /. y = try Some (x `div` y) with
             _ = None
 
(12 /. 2, 12 /. 0)