getOrNull

fun getOrNull(): A?

Returns the encapsulated value A if this instance represents Some or null if it is None.

import arrow.core.None
import arrow.core.Some
import io.kotest.matchers.shouldBe

fun test() {
Some(12).getOrNull() shouldBe 12
None.getOrNull() shouldBe null
}