Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using `noNumber.fold(0)(_ * 3)` makes it unclear whether or not the default value goes through the same process. In other words, is the result 0 because that's the value we provide, or because `0 = 0 * 3`? Using `val result2 = noNumber.fold(1)(_ * 3)` makes it clearer, as the result is 1 and not 3.
- Loading branch information