-
-
Save 9214/e0410184b76d9e6e339bd5d8e0000218 to your computer and use it in GitHub Desktop.
This file contains 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
Red [ | |
Title: "Ad-hoc streams" | |
Author: @9214 | |
Date: ..? | |
] | |
freeze: func [seed [block!] growth [function!]][ | |
insert seed :growth | |
] | |
thaw: func [stream [block!]][ | |
next append/only stream stream/-1 stream | |
] | |
fibonacci: function [stream [block!]][ | |
tip: tail stream | |
tip/-1 + tip/-2 | |
] | |
harmony: freeze [0 1] :fibonacci | |
probe loop 20 [thaw harmony] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment