Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created March 9, 2017 02:37
Show Gist options
  • Select an option

  • Save pedrofurla/2d660f5768757bdc21414aea3728a28d to your computer and use it in GitHub Desktop.

Select an option

Save pedrofurla/2d660f5768757bdc21414aea3728a28d to your computer and use it in GitHub Desktop.
list.map( x => {
val y = hardComplexStuff(x)
if( (f(y) && g(y)) === false ) true else false
})
// Why why someone would do the above vs:
list.map{ x =>
val y = hardComplexStuff(x)
!f(y) && !g(y)
}
// Disclaimer: These multiple occurences of what I consider stink mixed in *one* example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment