Guest User

Untitled

a guest
Feb 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. fun main(args: Array<String>) {
  2. val dummy: (String) -> Unit = {}
  3. val dummy2: (String) -> String = { "foo" }
  4. val foo = dummy2..dummy
  5.  
  6. dummy(dummy2(""))
  7. }
  8.  
  9.  
  10. operator fun <T, K> (() -> T).rangeTo(block: (T) -> K): () -> K = { block(this()) }
  11. operator fun <T, U, V> ((T) -> U).rangeTo(block: (U) -> V): (T) -> V = { block(this(it)) }
Add Comment
Please, Sign In to add comment