summaryrefslogtreecommitdiff
path: root/docs/examples/tcpoly/collection/HOSeq.scala
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2009-05-27 19:35:02 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2009-05-27 19:35:02 +0000
commitcc5e79c9ec9cea8d0f22020b528877d8f6e00153 (patch)
tree94e43f77c7b7271b3d0b6f9fb7372ae83b39360d /docs/examples/tcpoly/collection/HOSeq.scala
parent4b8be5d8bec86358276407d6521c41702ccda835 (diff)
downloadscala-cc5e79c9ec9cea8d0f22020b528877d8f6e00153.tar.gz
scala-cc5e79c9ec9cea8d0f22020b528877d8f6e00153.tar.bz2
scala-cc5e79c9ec9cea8d0f22020b528877d8f6e00153.zip
In "Iterable" and in all its subclasses, "itera...
In "Iterable" and in all its subclasses, "iterator" replaces "elements" (and assorted changes).
Diffstat (limited to 'docs/examples/tcpoly/collection/HOSeq.scala')
-rw-r--r--docs/examples/tcpoly/collection/HOSeq.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/tcpoly/collection/HOSeq.scala b/docs/examples/tcpoly/collection/HOSeq.scala
index f2fbf720e6..04e90012f1 100644
--- a/docs/examples/tcpoly/collection/HOSeq.scala
+++ b/docs/examples/tcpoly/collection/HOSeq.scala
@@ -16,7 +16,7 @@ trait HOSeq {
// is an invariant position -- should probably rule that out?
trait Iterable[+m[+x], +t] {
//def unit[a](orig: a): m[a]
- def elements: Iterator[t]
+ def iterator: Iterator[t]
// construct an empty accumulator that will produce the same structure as this iterable, with elements of type t
def accumulator[t]: Accumulator[m, t]
@@ -44,7 +44,7 @@ trait HOSeq {
// -- 2nd-order type params are not yet in scope in view bound
val elems = elements
while (elems.hasNext) {
- val elemss: Iterator[s] = f(elems.next).elements
+ val elemss: Iterator[s] = f(elems.next).iterator
while (elemss.hasNext) buf += elemss.next
}
buf.result
@@ -108,7 +108,7 @@ trait HOSeq {
def head: t
def tail: List[t]
def isEmpty: Boolean
- def elements: Iterator[t] = error("TODO")
+ def iterator: Iterator[t] = error("TODO")
// construct an empty accumulator that will produce the same structure as this iterable, with elements of type t
def accumulator[t]: Accumulator[List, t] = error("TODO")