Skip to content

Instantly share code, notes, and snippets.

@adam-arold
Created January 11, 2019 23:44
Show Gist options
  • Save adam-arold/61dff76aae0a090cf3f398a4821b3af1 to your computer and use it in GitHub Desktop.
Save adam-arold/61dff76aae0a090cf3f398a4821b3af1 to your computer and use it in GitHub Desktop.
fun <T: Subscription> MutableList<T>.cancelAll() {
forEach {
it.cancel()
}
clear()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment