-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solution2.2.6.5 provided #62
Conversation
Signed-off-by: Andreas Roehler <[email protected]>
Signed-off-by: Andreas Roehler <[email protected]>
*/ | ||
|
||
def byLength[A](xs: Seq[A], maxLength: Int): Seq[Seq[A]] = { | ||
if (xs.length) <= maxLength then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using both Scala 2 and Scala 3 for the tests. The syntax if a then b else c
is supported only in Scala 3.
I suggest rewriting to the old and compatible syntax if (xs.legth <= maxLength) Seq(xs) else Seq(...)
.
Signed-off-by: Andreas Roehler <[email protected]>
Signed-off-by: Andreas Roehler <[email protected]>
Signed-off-by: Andreas Roehler <[email protected]>
@@ -14,7 +14,7 @@ | |||
*/ | |||
|
|||
def byLength[A](xs: Seq[A], maxLength: Int): Seq[Seq[A]] = { | |||
if (xs.length) <= maxLength then | |||
if (xs.length) <= maxLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax should be:
if (xs.length <= maxLength)
Seq(xs)
...
No description provided.