Skip to content
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

Implicit tuple unpack #100

Closed
momohatt opened this issue Oct 3, 2019 · 2 comments
Closed

Implicit tuple unpack #100

momohatt opened this issue Oct 3, 2019 · 2 comments

Comments

@momohatt
Copy link
Member

momohatt commented Oct 3, 2019

Maybe the second one should raise type error?

> ((lambda [$x $y] (+ x y)) 1 2)
3
> ((lambda [$x $y] (+ x y)) [1 2])
3
@egisatoshi
Copy link
Member

In fact, it is the specification of Egison.

((lambda [$x $y] (+ x y)) 1 2) is a kind of syntax sugar of ((lambda [$x $y] (+ x y)) [1 2]), though there is a possibility that this specification will change if we support Currying as Haskell in future.

@momohatt
Copy link
Member Author

momohatt commented Oct 4, 2019

Right, but I think this can be confusing to normal functional programmers, as noted by one of the users...:
https://nekketsuuu.github.io/entries/2018/09/19/egison.html

@momohatt momohatt closed this as completed Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants