Skip to content

Instantly share code, notes, and snippets.

@stasimus
Created October 9, 2018 21:20
Show Gist options
  • Save stasimus/e6907a9d878c67140e7718fca84d188e to your computer and use it in GitHub Desktop.
Save stasimus/e6907a9d878c67140e7718fca84d188e to your computer and use it in GitHub Desktop.
val mapNResultWhenNull = Pair(p1, p2).mapN(stringPlus)
assertNull(mapNResultWhenNull)
val mapNResultNotNull = Pair(p2, p3).mapN(stringPlus)
assertNotNull(mapNResultNotNull)
assertEquals("p2p3", mapNResultNotNull)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment