tap None
Deprecated
tapNone is being renamed to onNone to be more consistent with the Kotlin Standard Library naming
Replace with
onNone(f)Content copied to clipboard
The given function is applied as a fire and forget effect if this is a None. When applied the result is ignored and the original None value is returned
Example:
import arrow.core.Some
import arrow.core.none
fun main() {
Some(12).tapNone { println("flower") } // Result: Some(12)
none<Int>().tapNone { println("flower") } // Result: prints "flower" and returns: None
}Content copied to clipboard