Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def x (atom 0))
- t1: (future interval) where interval is an infinite loop that (swap! x random_number) after 1 second
- t2: (future computation) where computation is (factorial x), but computation should only succeed if x didn't change before factorial is done
- (def computation (swap! x (fn [oldx] (factorial x) oldx))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement