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

Allow to unpack roots objects #180

Open
Kolaru opened this issue Nov 30, 2021 · 0 comments
Open

Allow to unpack roots objects #180

Kolaru opened this issue Nov 30, 2021 · 0 comments

Comments

@Kolaru
Copy link
Collaborator

Kolaru commented Nov 30, 2021

I think it would be nice to be able to unpack root objects as if they were tuples of (interval, status) e.g. have the following to work

julia> r = Root((1..2), :unique)
Root([1, 2], :unique)

julia> x, status = r

One interesting thing is that it would allow to iterate over the vector of Roots return by roots as follow

for (x, status) in roots(f, A)
    # do stuff
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant