Skip to content

Instantly share code, notes, and snippets.

@notyy
Created October 28, 2011 13:48
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 notyy/1322299 to your computer and use it in GitHub Desktop.
Save notyy/1322299 to your computer and use it in GitHub Desktop.
scala style
def assertArray[T](b1: Array[T], b2: Array[T]):Boolean = (Option(b1),Option(b2)) match {
case (None,None) => true
case (Some(arr1),Some(arr2)) if(arr1.toList == arr2.toList) => true
case _ => false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment