Skip to content

Commit 18f70cd

Browse files
Merge pull request #534 from DieterDePaepe/patch-1
Fix typo
2 parents 3c24f46 + 52e3edd commit 18f70cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/tour/mixin-class-composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Here is a concrete iterator class, which returns successive characters of a give
3333
def next = { val ch = s charAt i; i += 1; ch }
3434
}
3535

36-
We would like to combine the functionality of `StringIterator` and `RichIterator` into a single class. With single inheritance and interfaces alone this is impossible, as both classes contain member impementations with code. Scala comes to help with its _mixin-class composition_. It allows the programmers to reuse the delta of a class definition, i.e., all new definitions that are not inherited. This mechanism makes it possible to combine `StringIterator` with `RichIterator`, as is done in the following test program which prints a column of all the characters of a given string.
36+
We would like to combine the functionality of `StringIterator` and `RichIterator` into a single class. With single inheritance and interfaces alone this is impossible, as both classes contain member implementations with code. Scala comes to help with its _mixin-class composition_. It allows the programmers to reuse the delta of a class definition, i.e., all new definitions that are not inherited. This mechanism makes it possible to combine `StringIterator` with `RichIterator`, as is done in the following test program which prints a column of all the characters of a given string.
3737

3838
object StringIteratorTest {
3939
def main(args: Array[String]) {

0 commit comments

Comments
 (0)