Skip to content

Instantly share code, notes, and snippets.

@alexy
Created April 9, 2012 18:08
Show Gist options
  • Save alexy/2345102 to your computer and use it in GitHub Desktop.
Save alexy/2345102 to your computer and use it in GitHub Desktop.
extending verify to check semantics: both options must be set or unset together
(dateOpt, oldRankerPairsFileOpt) match {
case (Some(_),Some(_)) => Console.err.println("You gave both a date and the previous ranker-pairs file. Good.")
case (None, None) => // nothin' is nothin' is nothin'
case _ => sys.error("You have to give an old ranker-pairs file for a date, and vice versa. Bad.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment