Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.24 KB | None | 0 0
  1. (define (inc x)
  2.   (+ x 1))
  3.  
  4. (define (dec x)
  5.   (- x 1))
  6.  
  7. (define (+ a b)
  8.   (display a)(newline)
  9.   (if (= a 0)
  10.       b
  11.       (inc (+ (dec a) b))))
  12.  
  13. (+ 4 5)
  14.  
  15. (define (+ a b)
  16.   (if (= a 0)
  17.     b
  18.     (+ (dec a) (inc b))))
  19.  
  20. (+ 4 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement