Exceptions can be useful to make programs more efficient. In this particular example, a recursive multiplication function is made efficient by preventing it from returning “endlessly” once the answer is known:
Inefficient ( think of a 1 million element list with a 0 at the end )
let rec multl = function |  -> 1 | a::rest -> if a = 0 then 0 else a * (multl rest) ;;
Efficient ( use exceptions to return as soon as we see a zero )
exception Zero;; let multlexc l = let rec aux = function |  -> 1 | a::rest -> if a = 0 then raise Zero else a * (aux rest) in try aux l with Zero -> 0;;
Could it be possible to have a special keyword for this common situation in order to get rid of exceptions?
let rec multl = function |  -> 1 | a::rest -> if a = 0 then (grandparent 0) else a * (multl rest) ;;
If the compiler isn’t smart enough to detect this situations, then I think a special keyword could be useful to prevent extra code.