simon.vergauwen
fun T?.xxx
T?
tginiotis
raulraja
import arrow.syntax.nullable.*
Kind
fun <A> A.pureNullable(): A? = this fun <A, B> A?.map(f: (A) -> B): B? = this?.let(f) fun <A, B> A?.flatMap(f: (A) -> B?): B? = this?.let(f) fun <A> A?.empty(): Boolean = this != null fun <A, R> A?.fold(ifNull: () -> R, ifNotNull: (A) -> R): R = if (this == null) ifNull() else ifNotNull(this) fun <A, B> A?.ap(ff: ((A) -> B)?): B? = ff.flatMap { this.map(it) } fun <A> A?.filter(predicate: (A) -> Boolean): A? = if (this == null) this else if (predicate(this)) this else null
A modern programming language that makes developers happier.