Skip to content
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.5.2.6.scala provided #74

Merged
merged 5 commits into from
Nov 28, 2024
Merged

Conversation

andreas-roehler
Copy link
Contributor

No description provided.

Signed-off-by: Andreas Roehler <[email protected]>
Signed-off-by: Andreas Roehler <[email protected]>

def pairsIntern(goal: Int, xs: Array[Int], res: Seq[(Int, Int)] = Seq((0, 0))): Seq[(Int, Int)] = {
if (xs.isEmpty) res.reverse.tail
else
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using Scala 2, so you need braces after else if there is more than 1 expression.

if (...)...
else {
  val a = ...
  if (...)...
  else {
    val b = ...
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

Signed-off-by: Andreas Roehler <[email protected]>
Signed-off-by: Andreas Roehler <[email protected]>
Signed-off-by: Andreas Roehler <[email protected]>
@winitzki winitzki merged commit 9a4a6f2 into winitzki:master Nov 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants