-
-
Save shriphani/6574485 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require racket/place) | |
| (define (fib n) | |
| 1) | |
| (define (start-fib n) | |
| (define p | |
| (place ch | |
| (define n (place-channel-get ch)) | |
| (place-channel-put ch (fib n)))) | |
| (place-channel-put p n) | |
| p) | |
| (printf (format "~a\n" (place-channel-get (start-fib 10)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment