You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something like this would be really handy. Just like rust's ?.
f(a::Int)::Result{Int, SomeError} = div(3, a)
g(a::Int)::Result{Int, SomeError} = a*2
h(x::Int) = f(x) ⇶ g # returns the f's error if x is 0, but unwraps result and passes it to g otherwise
Rust has a syntactic shortcut for propagating errors. Would a similar operator work in ResultTypes.jl?
The text was updated successfully, but these errors were encountered: