flatMap(fromNullable(value), fn) — lift a nullable then bind through a Maybe-returning step. Convenient for chaining lookups.
flatMap(fromNullable(value), fn)
Maybe
optional(rawId, (id) => fromNullable(cache.get(id))); Copy
optional(rawId, (id) => fromNullable(cache.get(id)));
flatMap(fromNullable(value), fn)— lift a nullable then bind through aMaybe-returning step. Convenient for chaining lookups.