also we can make some eyes bleed with ``` fun <...
# getting-started
m
also we can make some eyes bleed with
Copy code
fun <T1 : Any, T2 : Any, T3 : Any, T4: Any, T5: Any, R: Any> safeLet(p1: T1?, p2: T2?, p3: T3, p4: T4, p5:T5, block: (T1, T2, T3, T4, T5) -> R?): R? {
    return if (p1 != null && p2 != null && p3 != null && p4 != null && p5 != null) block(p1, p2, p3, p4, p5) else null
}
o
menegatti: To be quite honest, I think code like this is completely fine, if it's been generated by a tool.
m
yeah, but here it was just an ad-hoc suggestion that I put together
that's why I don't really advise its use