Skip to content

and_then

In std/option.

fn and_then<U>(self, by: T -> Option<U>) : Option<U>

by applied to the value of self when present, its own none kept, and none otherwise: [4][0] | and_then(x => [10][x]) is none.