diff options
author | Burak Emir <emir@epfl.ch> | 2006-03-14 14:33:57 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-03-14 14:33:57 +0000 |
commit | 03f3c2af8c8d510114b1e36c39fa41be5ac5e1bd (patch) | |
tree | 95ab9fdc47db7070ef4a595dd0c2c80d71b7a1dd /src | |
parent | c09c5f39bcfd2870344e86b163158ad621d49ba4 (diff) | |
download | scala-03f3c2af8c8d510114b1e36c39fa41be5ac5e1bd.tar.gz scala-03f3c2af8c8d510114b1e36c39fa41be5ac5e1bd.tar.bz2 scala-03f3c2af8c8d510114b1e36c39fa41be5ac5e1bd.zip |
better NodeSeq
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/xml/NodeSeq.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/xml/NodeSeq.scala b/src/library/scala/xml/NodeSeq.scala index 198e341cfe..4152673942 100644 --- a/src/library/scala/xml/NodeSeq.scala +++ b/src/library/scala/xml/NodeSeq.scala @@ -17,7 +17,7 @@ object NodeSeq { def fromSeq(s:Seq[Node]):NodeSeq = new NodeSeq { def theSeq = s; } - implicit def view(s:Seq[Node]):NodeSeq = fromSeq(s); + implicit def view(s:Seq[Node]): NodeSeq = fromSeq(s); } /** a wrapper around Seq[Node] that adds XPath and comprehension methods */ @@ -90,7 +90,7 @@ abstract class NodeSeq extends Seq[Node] { def asList = elements.toList; - def map(f: Node => Node): NodeSeq = { val x = asList map f; x } + def map(f: Node => NodeSeq): NodeSeq = flatMap(f) def flatMap(f:Node => NodeSeq): NodeSeq = { val y = asList flatMap { x => f(x).asList }; y } |