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 OrderedSet constructor work on iterables, like base #50

Closed
kmsquire opened this issue Jul 18, 2014 · 0 comments
Closed

Make OrderedSet constructor work on iterables, like base #50

kmsquire opened this issue Jul 18, 2014 · 0 comments
Assignees

Comments

@kmsquire
Copy link
Member

For v0.3, the Set interface has been changed, so that Sets are now constructed from iterables. OrderedSet should make the same change.

(Need to check if this is true for Dicts as well.)

julia> a = [1,2,3]
3-element Array{Int64,1}:
 1
 2
 3

julia> Set(a)
Set{Int64}({2,3,1})

julia> OrderedSet(a)
OrderedSet{Array{Int64,1}}([1,2,3])

This last one should be:

julia> OrderedSet(a)
OrderedSet{Int64}(1,2,3)

Assigning myself, but I may not get to it soon, so anyone else should feel free to change this. It should be an easy change.

@kmsquire kmsquire self-assigned this Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant