SHARE
TWEET

Untitled

a guest Dec 5th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define (driver-loop)
  2.   (display "Please divide two numbers as an s-exp")
  3.   (newline)
  4.   (let ((x (read)))
  5.     (try (throw "cannot divide by zero")
  6.      catch
  7.      (lambda (exn)
  8.        (if (= 0 (caddr x))
  9.            (display exn)
  10.            (eval x)))))
  11.   (newline)
  12.   (driver-loop))
  13.  
  14. (driver-loop)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top