Skip to content

Instantly share code, notes, and snippets.

@xenophobia
Created August 24, 2012 03:39
Show Gist options
  • Save xenophobia/3445209 to your computer and use it in GitHub Desktop.
Save xenophobia/3445209 to your computer and use it in GitHub Desktop.
returnFun :: Bool -> (Int -> Int)
returnFun = [egison| (lambda [$b] (if b (lambda [$x] (* x 2)) (lambda [$y] (* y 3)))) :: Bool -> (Int -> Int)|]
> returnFun True 9
18
> returnFun False 9
27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment