Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperancinha committed Dec 28, 2023
1 parent 51f2458 commit 13be1d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kotlin-string-operations/src/test/kotlin/Others.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ class Others {
}
.joinToString("")


val result2 = testString
.reduce { acc, c ->
c
.takeIf { c > acc } ?: acc
}

result shouldBe "Thhttttttttttttttttttttttttttt"
result shouldBe "Thh".plus("t".repeat(27))
result.length shouldBe testString.length
result2 shouldBe 't'
}
Expand Down

0 comments on commit 13be1d7

Please sign in to comment.