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

min instead of max #1

Open
merkury opened this issue Oct 5, 2017 · 0 comments
Open

min instead of max #1

merkury opened this issue Oct 5, 2017 · 0 comments

Comments

@merkury
Copy link

merkury commented Oct 5, 2017

not really an "issue" but a comment (sorry, hope you don't mind)
found in: kotlin-course/lecture1/src/_2Functions.kt

//fun should be renamed in "min" or "<" changed to ">"
fun max(a: Int, b: Int): Int {
return if (a < b) a else b
}

//same here:
fun max2(a: Int, b: Int) = if (a < b) a else b

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

No branches or pull requests

1 participant