You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for flatmap states: "This is different than Option.map() because the result of the callback isn’t wrapped in a new Option." This test verifies that behavior:
def test_flatmap_some():
assert_that(option.Some(4).flatmap(lambda x: x + 1), equal_to(5))
However, the return type of the function is specified to be Option[U].