Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Because `nil` exists as a singleton in Ruby, we need to preserve it when yielded from `fmap` in order to obey the functor laws. This ensures that: 1.wrapped.fmap { nil }.unwrap_or(1) Returns `nil` and not `1`.
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters