diff options
Diffstat (limited to 'src/build')
-rw-r--r-- | src/build/genprod.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/build/genprod.scala b/src/build/genprod.scala index 842d235f24..5d47b0317e 100644 --- a/src/build/genprod.scala +++ b/src/build/genprod.scala @@ -52,8 +52,8 @@ object genprod { def covariantSpecs = "" def contravariantSpecs = "" def contraCoArgs = typeArgsString((targs map (contravariantSpecs + "-" + _)) ::: List(covariantSpecs + "+R")) - def fields = List.map2(mdefs, targs)(_ + ":" + _) mkString "," - def funArgs = List.map2(vdefs, targs)(_ + ":" + _) mkString "," + def fields = (mdefs, targs).zipped.map(_ + ":" + _) mkString "," + def funArgs = (vdefs, targs).zipped.map(_ + ":" + _) mkString "," def genprodString = "// generated by genprod on %s %s %s".format(now, withFancy, withMoreMethods) def now = new java.util.Date().toString() @@ -217,11 +217,11 @@ trait {className}{contraCoArgs} extends AnyRef {{ self => // (x1: T1) => (x2: T2) => (x3: T3) => (x4: T4) => apply(x1,x2,x3,x4) def shortCurry = { val body = "apply" + commaXs - List.map2(xdefs, targs)("(%s: %s) => ".format(_, _)).mkString("", "", body) + (xdefs, targs).zipped.map("(%s: %s) => ".format(_, _)).mkString("", "", body) } // (x1: T1) => ((x2: T2, x3: T3, x4: T4, x5: T5, x6: T6, x7: T7) => self.apply(x1,x2,x3,x4,x5,x6,x7)).curried - def longCurry = (List.map2(xdefs, targs)(_ + ": " + _) drop 1).mkString( + def longCurry = ((xdefs, targs).zipped.map(_ + ": " + _) drop 1).mkString( "(x1: T1) => ((", ", ", ") => self.apply%s).curried".format(commaXs) @@ -568,7 +568,7 @@ class Product(val i: Int) extends Group("Product") with Arity "\n" + ((xs ::: List(default)) map (" " + _ + "\n") mkString) } def proj = { - List.map2(mdefs, targs)( + (mdefs, targs).zipped.map( " /** projection of this product */\n def %s: %s\n\n".format(_, _) ) mkString } |