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

Make Array#flatten flatten itetators also #3726

Merged

Conversation

makenowjust
Copy link
Contributor

Related issue: #3703

This pull request makes Array#flatten and Iterator#flatten's behavior same if #3703 is merged.

@asterite
Copy link
Member

Good idea! This makes Array#flatten and Iterator#flatten consistent between each other. Thank you!

@asterite asterite merged commit c3fb8f2 into crystal-lang:master Dec 20, 2016
@asterite asterite added this to the 0.20.2 milestone Dec 20, 2016
flatten elem, result
end
end

def self.flatten(other : T, result)
result << other
end

def self.element_type(ary)
Copy link
Contributor

Choose a reason for hiding this comment

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

ary -> element?

@makenowjust makenowjust deleted the fix/array/flatten-iterator branch December 21, 2016 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants