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

Add count(itr) to count true elements #20408

Closed
wants to merge 1 commit into from
Closed

Add count(itr) to count true elements #20408

wants to merge 1 commit into from

Conversation

cossio
Copy link
Contributor

@cossio cossio commented Feb 2, 2017

Fix #20403.

@tkelman tkelman added the needs tests Unit tests are required for this change label Feb 2, 2017
"""
count(itr) = count(identity, itr)


Copy link
Member

Choose a reason for hiding this comment

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

One too many blank lines

julia> count(4<=i<=6 for i in [2,3,4,5,6])
3
```
"""
Copy link
Member

Choose a reason for hiding this comment

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

I think this docstring could be combined with the two-argument version as is done in #20405.

@ararslan ararslan added the collections Data structures holding multiple items, e.g. sets label Feb 2, 2017
@cossio cossio closed this Feb 2, 2017
@cossio
Copy link
Contributor Author

cossio commented Feb 2, 2017

Closing in favor of #20405.

@cossio cossio deleted the patch-1 branch February 2, 2017 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets needs tests Unit tests are required for this change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants