You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.
Sorry, if this is the wrong place - the issue is related to online koans (http://try.kotl.in), not these one. But I could not find the better place for this.
Online koans are really great. And "Show answer" button is very handy: it helps to check out, is your solution the best for the kotlin style.
It works well with your test data set, but it's really bad idea to do this if, say, x = Int.MIN_VALUE and y = -1. And of course the correct solution here is "y.compareTo(x)".
I understand that this is not related to the kotlin koans directly. But someone can use the wrong pattern and get a bug. So please fix this.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sorry, if this is the wrong place - the issue is related to online koans (http://try.kotl.in), not these one. But I could not find the better place for this.
Online koans are really great. And "Show answer" button is very handy: it helps to check out, is your solution the best for the kotlin style.
But in two tasks below you give not quite perfect answers. The suggested solution for comparing two Ints is "y - x":
https://try.kotlinlang.org/#/Kotlin%20Koans/Introduction/Object%20expressions/Task.kt
https://try.kotlinlang.org/#/Kotlin%20Koans/Introduction/SAM%20conversions/Task.kt
It works well with your test data set, but it's really bad idea to do this if, say, x = Int.MIN_VALUE and y = -1. And of course the correct solution here is "y.compareTo(x)".
I understand that this is not related to the kotlin koans directly. But someone can use the wrong pattern and get a bug. So please fix this.
The text was updated successfully, but these errors were encountered: