pub fn and_then<U, F>(self, f: F) -> Option<U>
    where
        F: FnOnce(Box<T>) -> Option<U>,
    {
        self.ptr.and_then(f)
    }
/// Returns None if the option is None, otherwise calls f with the wrapped value and returns the result.
/// Some languages call this operation flatmap.
///
/// ```rust
/// use galbi::*;
///
/// fn sq(x: Box<u32>) -> Option<u32> {
///     Some((*x)*(*x))
/// }
/// fn nope(x: Box<u32>) -> Option<u32> {
///     None
/// }
///
/// assert_eq!(OptionBox::some(2).and_then(sq), Some(4));
/// assert_eq!(OptionBox::some(2).and_then(nope), None);
/// assert_eq!(OptionBox::<u32>::none().and_then(sq), None);
/// ```
Returns None if the option is None, otherwise calls f with the wrapped value and returns the result.
Some languages call this operation flatmap.






Returns None if the option is None otherwise calls f with the wrapped value and returns the result . Some languages call this operation flatmap .
pub fn and_then<U, F>(self, f: F) -> Option<U>
    where
        F: FnOnce(Box<T>) -> Option<U>,
    {
        self.ptr.and_then(f)
    }
pub fn and_then < U , F > ( self , f : F ) -> Option < U > where F : FnOnce ( Box < T > ) -> Option < U > , { self . ptr . and_then ( f ) }
Returns None if the option is None, otherwise calls f with the wrapped value and returns the result.
Returns None if the option is None otherwise calls f with the wrapped value and returns the result .
self
f
F
self
f
F