Pytania oznaczone «matching»

195
Co robi `: _ *` (gwiazda dwukropka) w Scali?

Mam następujący fragment kodu z tego pytania : def addChild(n: Node, newChild: Node) = n match { case Elem(prefix, label, attribs, scope, child @ _*) => Elem(prefix, label, attribs, scope, child ++ newChild : _*) case _ => error("Can only add children to elements!") } Wszystko w nim jest...