Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; 8/9th function
- (define (my-delay thunk)
- (mcons 0 (mcons thunk thunk)))
- (define (my-force prom)
- (if (= (modulo (mcar prom) 5) 0)
- (begin (set-mcar! prom (+ (mcar prom) 1))
- (set-mcar! (mcdr prom) ((mcdr (mcdr prom))))
- (mcar (mcdr prom)))
- (begin (set-mcar! prom (+ (mcar prom) 1))
- (mcar (mcdr prom)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement