Skip to content

Document polymorphic function types #10663

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

Merged
merged 4 commits into from
Dec 8, 2020

Conversation

LPTK
Copy link
Contributor

@LPTK LPTK commented Dec 5, 2020

Cf. #10633

@LPTK LPTK force-pushed the polymorphic-function-types-doc branch from 9441553 to 1e512c2 Compare December 5, 2020 18:06
@nicolasstucki nicolasstucki requested a review from smarter December 6, 2020 08:53
@bishabosha
Copy link
Member

you will need to update the sidebar as well https://github.com/lampepfl/dotty/blob/master/docs/sidebar.yml

@LPTK
Copy link
Contributor Author

LPTK commented Dec 7, 2020

@bishabosha good catch; done!

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super useful, thanks a lot for taking the time to write this!

@LPTK
Copy link
Contributor Author

LPTK commented Dec 8, 2020

@smarter thanks for reviewing!

@smarter smarter merged commit 1f173db into scala:master Dec 8, 2020
@b-studios b-studios mentioned this pull request Dec 10, 2020
16 tasks
One would call the function `bar` above
by passing it a type argument `bar[Int]` _within a method body_.
On the other hand, given a type lambda such as `type F = [A] =>> List[A]`,
one would call `F` _withing a type expression_, as in `type Bar = F[Int]`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
one would call `F` _withing a type expression_, as in `type Bar = F[Int]`.
one would call `F` _within a type expression_, as in `type Bar = F[Int]`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

4 participants