-
-
Save marrub--/b13e8bd6a7e5f8ce10a1ff2f48fed228 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
let rec rep n s = if n = 0 then "" else s ^ rep (n - 1) s;; | |
let rec jort n st = | |
if n > 1 then | |
let j = rep n " jort" | |
and k = rep (n - 1) " jort" in | |
let l = "jean short" ^ k ^ "s (" ^ (jort (n - 1) false) ^ ")" in | |
if st then j ^ "s (" ^ l ^ ")" else l | |
else | |
"jean shorts";; | |
let jort n = jort n true;; | |
print_endline (jort 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment