motoko icon indicating copy to clipboard operation
motoko copied to clipboard

Feature Request: Let-Else with value access in else

Open Gekctek opened this issue 2 years ago • 0 comments

let #a(aValue) = method1() else return _; // where _ is the value of method1() call

Just some thoughts on the let else. Many times I want to be able to access the value of method1() in the else statement without having to break out the method1() call with let v = method1(), then do the let-else expression. Also on top of the, with #4350 , it could access the super set of the pattern in the else statement Low priority

Gekctek avatar Jan 08 '24 21:01 Gekctek