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

Minor fixes and solution2.2.6.1_foldLeft #55

Merged
merged 5 commits into from
Mar 17, 2024

Conversation

andreas-roehler
Copy link
Contributor

No description provided.

Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
xs.foldLeft(init){ (x, y) => x :+ y._1 :+ y._2 }
}
def main(args: Array[String]) = {
val result: Seq[String] = this.fromPairs(List(("a","b"), ("c","<nothing>")))
Copy link
Owner

Choose a reason for hiding this comment

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

I would remove this and just write val result = fromPairs ..

Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
assert(result == expected)

val a: Seq[Int] = this.fromPairs(List((1, 2), (3, 4)))
Copy link
Owner

Choose a reason for hiding this comment

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

Here is another this.fromPairs - maybe remove it?

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 - 'grep' seems to be on strike here today :)

Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
@winitzki winitzki merged commit 25362d4 into winitzki:master Mar 17, 2024
2 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