tapNone

inline fun tapNone(f: () -> Unit): Option<A>

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
}