Created
June 16, 2009 22:25
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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