Combination of Opt.flatMap and opt functions.
some(1).chainToOpt(x => x === 1 ? null : x + 1) // Nonesome(2).chainToOpt(x => x === 1 ? null : x + 1) // Some(3)
chainToOpt
Combination of Opt.flatMap and opt functions.