Skip to content

Instantly share code, notes, and snippets.

@dacr
Created July 13, 2014 16:59
Show Gist options
  • Save dacr/6156adce045ffef41bb4 to your computer and use it in GitHub Desktop.
Save dacr/6156adce045ffef41bb4 to your computer and use it in GitHub Desktop.
scala> def testA:Boolean = false
testA: Boolean
scala> def testB:Boolean=true
testB: Boolean
scala> def testC:Boolean={println("oups"); false}
testC: Boolean
scala> if ((testA#::testB#::testC#::Stream.empty).exists(_ == true)) println("OK")
OK
scala>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment