Skip to content

Instantly share code, notes, and snippets.

@beyondxscratch
Last active July 17, 2020 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beyondxscratch/c20e9996d8dba6729029a0dcb33e36d5 to your computer and use it in GitHub Desktop.
Save beyondxscratch/c20e9996d8dba6729029a0dcb33e36d5 to your computer and use it in GitHub Desktop.
/* Before */
//Check if the talk is related to a topic
if(talk.title.contains("topic")){}
//Check that the recommendation has some talks related to the topic
if((recommendation.talks.map { it.title }.anyMatch{ it.contains("topic") }){}
/*After cleaning the code*/
if(talk.isRelatedTo("topic")){}
if((recommendation.hasTalksRelatedTo("topic")){}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment