From a16c4d102857ee8e86b39571c3561c5f3ab5e835 Mon Sep 17 00:00:00 2001 From: Luc Henninger Date: Fri, 16 Sep 2022 18:45:20 +0200 Subject: [PATCH] Remove a wrong '}' --- _tour/mixin-class-composition.md | 1 - 1 file changed, 1 deletion(-) diff --git a/_tour/mixin-class-composition.md b/_tour/mixin-class-composition.md index ee63462306..27eeafbf61 100644 --- a/_tour/mixin-class-composition.md +++ b/_tour/mixin-class-composition.md @@ -136,7 +136,6 @@ This trait implements `foreach` by continually calling the provided function `f: ```scala trait RichIterator extends AbsIterator: def foreach(f: T => Unit): Unit = while hasNext do f(next()) -} ``` This trait implements `foreach` by continually calling the provided function `f: T => Unit` on the next element (`next()`) as long as there are further elements (`while hasNext`). Because `RichIterator` is a trait, it doesn't need to implement the abstract members of AbsIterator.