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

Documentation of slurping type constraint #22799

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Jul 13, 2017

Implements #22755

@ararslan ararslan added the docs This change adds or pertains to documentation label Jul 13, 2017
@JeffBezanson JeffBezanson merged commit 1e140a1 into JuliaLang:master Jul 14, 2017
@@ -547,6 +547,8 @@ function getindex(A::AbstractArray{T,N}, indexes::Vararg{Number,N}) where {T,N}

would be called only when the number of `indexes` matches the dimensionality of the array.

When only the type of supplied arguments needs to be constrained `Vararg{T}` can be equivalently written as `T...`. For instance `f(x::Int...) = x` is a shorthand for `f(x::Vararg{Int}) = x`.
Copy link
Contributor

Choose a reason for hiding this comment

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

usually recommended to follow the line length convention of the surrounding file

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure thing, I will fix it to keep the code clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants