/** * Builds a new maybe constructed using the value of self. * * @tsplus static Maybe.Aspects flatMap * @tsplus pipeable Maybe flatMap */ export function flatMap(f: (a: A) => Maybe) { return (self: Maybe): Maybe => self.isNone() ? Maybe.none : f(self.value) }