Skip to content

Conversation

GlenHertz
Copy link
Contributor

No description provided.

@dkarrasch dkarrasch added the feature Indicates new feature / enhancement requests label Jun 10, 2021
@GlenHertz
Copy link
Contributor Author

I guess I'd need to add some tests. But please let me know if this feature is acceptable.

@oscardssmith oscardssmith added the triage This should be discussed on a triage call label Jun 11, 2021
base/array.jl Outdated
-4
```
!!! compat "Julia 1.8"
This functionality requires at least Julia 1.8
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
This functionality requires at least Julia 1.8
This method requires at least Julia 1.8.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

@jakobnissen
Copy link
Member

If this is to be done, I think it should be done consistently for filter, Iterators.filter, map, Iterators.map, reduce, mapreduce, foldl and foldr.

@simeonschaub
Copy link
Member

If this is to be done, I think it should be done consistently for filter, Iterators.filter, map, Iterators.map, reduce, mapreduce, foldl and foldr.

See #35293

@JeffBezanson
Copy link
Member

From triage: we can't do this for map because the 0-collection case is useful (this has been discussed before). However it can be done for all the other listed functions.

  • For mapreduce I assume you'd need to pass two functions up front? The result should always be a 1-argument function that accepts a collection/iterator.
  • reduce, foldl, and foldr also need to accept an init keyword arg (on the first call, IMO).
  • Idea from @StefanKarpinski : add mapper(f) to handle the x->map(f, x) case.

@JeffBezanson JeffBezanson removed the triage This should be discussed on a triage call label Jun 17, 2021
GlenHertz and others added 2 commits November 5, 2021 21:43
Co-authored-by: Johnny Chen <[email protected]>
Co-authored-by: Johnny Chen <[email protected]>
Nice!

Co-authored-by: Michael Abbott <[email protected]>
Copy link
Contributor Author

@GlenHertz GlenHertz left a comment

Choose a reason for hiding this comment

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

Nice!

@GlenHertz
Copy link
Contributor Author

Is this good to go now?

@ViralBShah
Copy link
Member

Bump. Merge?

@StefanKarpinski StefanKarpinski added the triage This should be discussed on a triage call label Sep 28, 2022
@JeffBezanson JeffBezanson removed the triage This should be discussed on a triage call label Sep 29, 2022
@JeffBezanson JeffBezanson merged commit 6e1e6fa into JuliaLang:master Sep 29, 2022
Comment on lines +2656 to +2657
!!! compat "Julia 1.8"
This method requires at least Julia 1.8.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be 1.9 right?

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
!!! compat "Julia 1.8"
This method requires at least Julia 1.8.
!!! compat "Julia 1.9"
This method requires at least Julia 1.9.

Copy link
Member

Choose a reason for hiding this comment

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

Was hoping that GitHub provides a way to make a new PR from a comment like this. Alas...

Copy link
Member

Choose a reason for hiding this comment

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

Created the old fashioned way: #47045.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Indicates new feature / enhancement requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.