Guest User

Untitled

a guest
Jul 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. inline fun <T, R> ifNotNull(value: T?, thenPart: (T) -> R, elsePart: () -> R): R {
  2. return if (value != null) {
  3. thenPart(value)
  4. } else {
  5. elsePart()
  6. }
  7. }
Add Comment
Please, Sign In to add comment