Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Works fine
- (define (factorial n)
- (if (> n 1)
- (* n (factorial (- n 1)))
- 1))
- ; Interpreter freezes
- (define (new-if predicate then-clause else-clause)
- (if predicate
- then-clause
- else-clause))
- (define (factorial n)
- (new-if (> n 1)
- (* n (factorial (- n 1)))
- 1))
Advertisement
Add Comment
Please, Sign In to add comment