pepe
03/23/2022, 3:37 PMOption.fromNullable(nullableValue).mapNotNull(::f1).flatMap(::f2)
where f1 is suspend (String) -> String?
and f2 is suspend (String) -> Option(Whatever)
, is this supported?simon.vergauwen
03/23/2022, 3:57 PMinline fun
even though it supports it.
If you write the equivalent code below it'll work.
Option.fromNullable(nullableValue).mapNotNull { f1(it) }.flatMap { f2(it) }
pepe
03/23/2022, 3:59 PMsimon.vergauwen
03/28/2022, 4:18 PM