Option::and_then
pub fn and_then<U>(T -> Option<U> f) -> Option<U>
Source: compiler/src/prelude/core.hy f(value) (itself an Option), or None.
Called on a Option value as value.and_then(…).
Parameters#
| Name | Type |
|---|---|
f | T -> Option<U> |
Returns#
Option<U>
See also#
OptionOption::is_some: True when this isSome.Option::is_none: True when this isNone.Option::unwrap_or: The value, orfallbackwhenNone.Option::unwrap_or_else: The value, or the result offwhenNone.Option::map:Some(f(value)), orNone.Option::map_or:f(value), orfallbackwhenNone.Option::or: This option if it isSome, otherwiseother.