-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
() -> a = a #50
Comments
I am not sure whether you are asking an question or stating a falsehood. I shall assume the former. Koka is a strict functional language with n-ary functions. By contrast Haskell is a lazy functional language with unary functions. It is possible to simulate n-ary functions (to some extent) in Haskell by using tuples. The function type
In Koka the function type |
@zaoqi Haskell programs are lazy, which means values are only evaluated when they are needed. In addition, Haskell programs do not have side effects, so side effects are represented with the Koka programs are not lazy, so everything is evaluated immediately. In addition, Koka programs do have side effects, and Koka does not have the In other words, Haskell programs are automatically delayed, but Koka programs must use functions to delay evaluation. It is possible to create an
And then you can create
This is the same as this Haskell program:
As you can see, a Koka could wrap everything in |
() -> a = a
Haskell:
Koka:
The text was updated successfully, but these errors were encountered: