Skip to content

Commit

Permalink
Fix one more oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
jiribenes committed Jan 22, 2025
1 parent b4ce2d5 commit 7105dd2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/stdlib/set/unique.effekt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ def main() = {
println("")

def testSorted(s: Set[String]) = {
val sorted = s.toList.isSortedBy { (x, y) => x <= y }
val sorted = s.toList.isSortedBy { (x, y) =>
x.compareStringBytes(y) match {
case Equal() => true
case Less() => true
case Greater() => false
}
}
if (sorted) {
println("sorted")
} else {
Expand Down

0 comments on commit 7105dd2

Please sign in to comment.