Skip to content

Instantly share code, notes, and snippets.

@EmmanuelGuther
Last active October 26, 2018 00:57
Show Gist options
  • Save EmmanuelGuther/32dec33ff906686bcf2fcb1cd9d61ae8 to your computer and use it in GitHub Desktop.
Save EmmanuelGuther/32dec33ff906686bcf2fcb1cd9d61ae8 to your computer and use it in GitHub Desktop.
To check if a list have contains an element that have specific “id”, we can use any functions like this:
fun foo(){
myList.any { it -> it.id == valueToCheck }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment