Created
November 2, 2016 22:09
-
-
Save TheophileWalter/6cc9e16584be82108685f2e2bb27f43d 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
| (* Compile with '-rectypes' option *) | |
| let delta x = | |
| if x mod 2 = 0 then x / 2 | |
| else 3*x + 1 in | |
| let syr s x = | |
| Printf.printf "%d " x; | |
| if x <= 1 then () | |
| else s s (delta x) in | |
| syr syr 420;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment