jacob
fun <A, B> A?.fold(default: B, f: (A, B) -> B) = if (this == null) { default } else { f(this, default) }