Skip to content

Instantly share code, notes, and snippets.

View toxakktl's full-sized avatar

Tokhtar Yelemessov toxakktl

View GitHub Profile
package kz.technodom.merchant.service
import java.lang.StringBuilder
fun Int.abs() : Int = if (this < 0) -this else this
fun List<String>.midElement() : String {
if (this.isEmpty()){
throw NoSuchElementException("List is empty")
}
package kz.technodom.merchant.service
//Simple hello world
fun main() {
println("Hello, World")
printMessage("Hello!")
printMessageWithPrefix("Hello", "Toxa")
printMessageWithPrefix("Hello2" )
multiply(2,3)