Seq :+ repeat parameter
Rich Oliver <[email protected]> Thu, 7 Apr 2016 05:45:28 -0700 (PDT)
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
I have created the following code and it seems to compile and run correctly:
val scaleButs = Seq(CanvButton("+", () => { scale = (scale *
1.5).min(scaleMax); repaintMap() }),
CanvButton("-", () => { scale = (scale / 1.5).max(scaleMin);
repaintMap() }))
val mapButs = scaleButs :+ (
CanvButton("<=", () => { mapFocus = mapFocus.subX(moveInc);
repaintMap() }),
CanvButton("=>", () => { mapFocus = mapFocus.addX(moveInc);
repaintMap() }),
CanvButton("Up", () => { mapFocus = mapFocus.addY(moveInc);
repaintMap() }),
CanvButton("down", () => { mapFocus = mapFocus.subY(moveInc);
repaintMap() })
)
But in the API documentation the :+ doesn't have a repeat parameter. I've
looked in SeqLike.scala
https://github.com/scala/scala/blob/v2.11.8/src/library/scala/collection/SeqLike.scala#L1
and I can't see any repeat parameter for the :+ method there either.
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.