-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[DOC] Doc for Array#zip #11961
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
[DOC] Doc for Array#zip #11961
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having a hard time following this documentation because I don't understand what operands
means.
Discussion recast to omit "operand." |
array.c
Outdated
* | ||
* Each nested array <tt>new_array[n]</tt> is of size <tt>other_arrays.size+1</tt>, | ||
* and contains: | ||
* Returns an array of size <tt>other_arrays.size + 1</tt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true? It returns an array of size self.size
and each subarray is of size other_arrays.size + 1
:
[1, 2].zip([3, 4], [5, 6], [7, 8]) # => [[1, 3, 5, 7], [2, 4, 6, 8]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
No description provided.