-
Notifications
You must be signed in to change notification settings - Fork 53
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
Setting nested Options to Some(value) #39
Comments
I'm afraid this is very option-chain-specific. Firstly, you wouldn't be able to use |
What about a variation of |
But what would you put in the indicies in between? Also, how would you initialize an "empty" object which would be added to the sequence? |
Maybe a type class A completely alternative solution would be a |
Maybe |
Yeah, on a second thought, there's no much difference between I guess you're right :) |
Hi,
Given a nested chain of
Option
s, is there a way to coerce the most inner one toSome
?The current operator
.each
allows traversingOption
s, but acts likemap
:(the result is
A(None)
, but how can we achieve aA(Some(B(Some(C(Some(3))))))
?)It could be useful if there were some operator (say,
all
) which can act as follows:The text was updated successfully, but these errors were encountered: