4 ms·
would this work on python? repeat3(lambda: greet('themagicalcake'))
by lalos 6y ago
would this work on python?
repeat3(lambda: greet('themagicalcake'))
- saithound 6y agoIt would work in the sense that it would not throw an exception, but it wouldn't work the same way in every situation. Haskell's `greet "themagicalcake"` does not correspond to Python's `greet('themagicalcake')`, nor does it correspond to Python's `lambda: greet('themagicalcake')` in every situation. E.g. you can write main = greet "themagicalcake" in Haskell to get a program that just prints Hello themagicalcake but the Python program if __name__ == "__main__": lambda: repeat3(greet('themagicalcake')) prints nothing.