Created
December 17, 2012 02:07
-
-
Save LeifW/4315293 to your computer and use it in GitHub Desktop.
by-name vs by-value
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
| module Main | |
| import Debug.Trace | |
| foo : (x: Int) -> String | |
| foo x = show (x + 10) ++ show x | |
| five : Int | |
| five = trace "evaling" 5 | |
| main : IO () | |
| main = putStrLn $ foo five |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment