Closed 6293 closed 3 years ago
Merging #27 (1e8add4) into main (a9e41f2) will decrease coverage by
0.04%
. The diff coverage is60.00%
.
@@ Coverage Diff @@
## main #27 +/- ##
==========================================
- Coverage 80.53% 80.48% -0.05%
==========================================
Files 38 38
Lines 2173 2178 +5
==========================================
+ Hits 1750 1753 +3
- Misses 423 425 +2
Impacted Files | Coverage Δ | |
---|---|---|
expression/core/option.py | 87.83% <60.00%> (-0.76%) |
:arrow_down: |
Some(42).or_else(f())
evaluates f() even though the result is never applied, and this is what you do not like when f() performs heavy computations.Some(42).or_else_with(lambda: f())
is the solution to this problem.https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-optionmodule.html#orElseWith