Option monad updates and safe-divide function