Skip to content

Instantly share code, notes, and snippets.

@MrPickles
Created May 12, 2017 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrPickles/f246a9b313c8dea88fafeac5d5450050 to your computer and use it in GitHub Desktop.
Save MrPickles/f246a9b313c8dea88fafeac5d5450050 to your computer and use it in GitHub Desktop.
Guess the type of the mysterious OCaml variable!
let mystery =
let pair x f = f x x in
let f1 x = pair x in
let f2 x = f1 (f1 x) in
let f3 x = f2 (f2 x) in
let f4 x = f3 (f3 x) in
let f5 x = f4 (f4 x) in
fun z -> (f5 (fun x -> x) z)
;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment