Created
September 13, 2012 08:21
-
-
Save aktau/3712840 to your computer and use it in GitHub Desktop.
scala combinedtablemetadata
This file contains 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
// doesn't work | |
class CombinedTableMetadata[A](op: (List[A], List[A]) => List[A]) { | |
val listInts1 : List[Int] | |
val listInts2 : List[Int] | |
val listStrings1: List[String] | |
val listStrings2: List[String] | |
def doThis : List[Int] = op(listInts1, listInts2) | |
def doThat : List[String] = op(listStrings1, listStrings2) | |
} | |
// works | |
class CombinedTableMetadata2 { | |
def op[A](left: List[A], right: List[A]) : List[A] | |
val listInts1 : List[Int] | |
val listInts2 : List[Int] | |
val listStrings1: List[String] | |
val listStrings2: List[String] | |
def doThis : List[Int] = op(listInts1, listInts2) | |
def doThat : List[String] = op(listStrings1, listStrings2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment