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

collect(powerset(::Set)) doesn't work #98

Open
anandijain opened this issue Aug 21, 2020 · 0 comments
Open

collect(powerset(::Set)) doesn't work #98

anandijain opened this issue Aug 21, 2020 · 0 comments

Comments

@anandijain
Copy link

anandijain commented Aug 21, 2020

powerset(::Set) works, but returns Iterator.

julia> s
Set{Char} with 3 elements:
  'a'
  'c'
  'b'

julia> collect(powerset(s))
ERROR: MethodError: no method matching getindex(::Set{Char}, ::Int64)

collect(powerset(collect(s))) works as expected though.

I think it'd be nice to be able to work with set theory without syntactic issues like this, particularly for pedagogic purposes.

edit: sorry accidentally pressed enter and it made the issue.

@anandijain anandijain changed the title collect(powerset(::Set)) doesn collect(powerset(::Set)) doesn't work Aug 21, 2020
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