Extension-oriented design

string.replace(' ', '-')
leftPad(string, ' ', length)
string.padLeft(' ', length)
interface Obscure {
val foo: Int
val bar: Int
val sum: Int
val max: Int
val min: Int
}
interface NotObscure {
val foo: Int
val bar: Int
}
val NotObscure.sum: Int
val NotObscure.max: Int
val NotObscure.min: Int

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store