3 ms·
My Haskell is rusty enough that I don’t know the proper syntax for it, but you can make a program that calls foo and then throws away / never uses the IO comput
by adastra22 11mo ago
My Haskell is rusty enough that I don’t know the proper syntax for it, but you can make a program that calls foo and then throws away / never uses the IO computation. Because Haskell is lazy, “Hello” will never be printed.
- tome 11mo agoYou can do this main = do let x = foo putStrLn "foo was never executed" but you can also do this def main(): x = foo print("foo was never executed") What's the difference?