I really missed my Result
type from Rust, so I’ve keep writing this on my libraries using SumTypes.jl:
using SumTypes
@sum_type Result{A, B} begin
Ok{A}(::A)
Err{B}(::B)
end
#Some functions to work with result types from Rust
unwrap(a::Result) = ...
Does anyone else does this, and if yes, do you make your own result type or you use a library?