Skip to content

Instantly share code, notes, and snippets.

@sugitach
Created January 15, 2015 11:11
Show Gist options
  • Save sugitach/b9865c96eb7efe03da3c to your computer and use it in GitHub Desktop.
Save sugitach/b9865c96eb7efe03da3c to your computer and use it in GitHub Desktop.
(* 13.5 *)
let twice f = let g x = f (f x) in g
let f = twice twice
(* できあがった関数は渡された関数を4回繰り返したものになる *)
(* val f : ('_a -> '_a) -> '_a -> '_a = <fun> *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment