4 ms·
How is this different from match case ok case err or from if result.val?
by impoppy 5y ago
How is this different from match case ok case err or from if result.val?
- hackandtrip 5y agoWell, the most basic pro is to avoid indentation and have pure function which are clear and have less assumption to take into account; if I know that my pipes always return me a result such as the one I want, and the "bad path" is discarded automatically, code is way cleaner. Imagine a code without `if result is not None` basically!