RosettaCodeData/Task/Detect-division-by-zero/TXR/detect-division-by-zero.txr
2014-01-17 05:34:36 +00:00

6 lines
174 B
Text

@(do (defun div-check (x y)
(catch (/ x y)
(numeric_error (msg)
'div-check-failed))))
@(bind good @(div-check 32 8))
@(bind bad @(div-check 42 0))