Skip to content

Instantly share code, notes, and snippets.

View maxyou's full-sized avatar

Hongyu You maxyou

View GitHub Profile
import org.junit.Test
class SolutionTest {
data class Person(val name:String, val board: IntArray){
var age:Int = 0
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
@maxyou
maxyou / app.kt
Created May 5, 2020 10:53
Instantiating a function type
fun myFunIns(data:Int, myFun:(arg:Int)->Int):Int{
return myFun(data)
}
fun main(){
// 1.1
var result1 = myFunIns(123, {
it * 2
})