-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Modify permutations function to take a size argument #12863
Comments
Why is it reasonable? |
This functionality is something that at least I have used in the past (in Python), and it should be a fairly straightforward extension to the existing functionality. Why wouldn't it be reasonable? I'm open to counter arguments. |
I do also think that the permutations function should probably be moved out of |
It just seems like one more thing to add for the sake of it, when it should really be in a package (or you can do what I proposed on SO). |
I don't have strong feelings either way to be honest, but I do lean towards not adding it to Base. Certainly think it should be questioned. |
Sure. julia> collect(chain([permutations(x) for x in subsets(collect("ABC"), 2)]...))
6-element Array{Array{Char,1},1}:
['A','B']
['B','A']
['A','C']
['C','A']
['B','C']
['C','B'] I think that would take a little while for most users to figure out if they aren't familiar with the Iterators.jl package. And I find it rather ugly. (But I really would have no problem if the functionality suggested here were added there instead.) |
(But if it's put in |
Please, permutations certainly belong to base. As a data point: |
Hi. If anybody else is not working on this, then can I work on this? |
@AnishShah You sure can - it would be appreciated. |
@AnishShah Are you still working on this? |
can probably close this since this has been moved out of Base? |
Yep, good call, closed by #13897. Could be reopened as a feature request at Combinatorics.jl though. |
As seen here:
It woulds be a reasonable extension of the
permutations
function to add this.The text was updated successfully, but these errors were encountered: