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

Question about function type constructor explain #279

Closed
neighborhood999 opened this issue Dec 5, 2017 · 2 comments
Closed

Question about function type constructor explain #279

neighborhood999 opened this issue Dec 5, 2017 · 2 comments

Comments

@neighborhood999
Copy link

neighborhood999 commented Dec 5, 2017

In Function type constructor second explain:

The syntax is: () -> , where comprises zero or more comma–space (,)-separated type representations and parens may be omitted for unary functions.

Sorry, I'm not a native in English so I feel confuse, Is parens means parents? Thanks!

@davidchambers
Copy link
Member

Thank you for raising this issue, @neighborhood999. I'm sorry that the wording is unclear. Parens is another way of writing parentheses, the plural form of parenthesis.

The quoted sentence states that although one could write (a) -> b, for a function with exactly one parameter it's okay to write a -> b instead (without parens).

I hope this is clearer now. :)

@neighborhood999
Copy link
Author

@davidchambers Thanks for your explain, It's clear to me!

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