Skip to content

Instantly share code, notes, and snippets.

@YuvalItzchakov
Created September 6, 2016 08:57
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 YuvalItzchakov/8922636e2fa8b5b0e060fb6f69adbd0e to your computer and use it in GitHub Desktop.
Save YuvalItzchakov/8922636e2fa8b5b0e060fb6f69adbd0e to your computer and use it in GitHub Desktop.
scala> Array(1,2,3,4).sliding(2).forall {
| case Array(x, y) => x < y
| case _ => true
| }
res4: Boolean = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment