Skip to content

Instantly share code, notes, and snippets.

@mudge
Created June 16, 2009 22:25
Show Gist options
  • Save mudge/130945 to your computer and use it in GitHub Desktop.
Save mudge/130945 to your computer and use it in GitHub Desktop.
A solution to the ordering problem (http://gist.github.com/78519) in Scala.
def ordered(arrays: Seq[Any]*): Boolean =
arrays forall (array =>
arrays forall (array2 =>
Set(array : _*).intersect(Set(array2 : _*)).toSeq == Set(array2 : _*).intersect(Set(array : _*)).toSeq
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment