snowe
12/13/2019, 5:33 PMfun a(n: Int)=if (n/3-2 <= 0) 0 else n/3-2 + a(n/3-2)
results in this error
Error:(107, 46) Kotlin: Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly
snowe
12/13/2019, 5:34 PMCasey Brooks
12/13/2019, 5:36 PMfun a(n: Int): Int {
return if (n/3-2 <= 0) 0 else n/3-2 + a(n/3-2)
}
snowe
12/13/2019, 5:36 PMsnowe
12/13/2019, 5:36 PMfun a(n: Int):Int=if (n/3-2 <= 0) 0 else n/3-2 + a(n/3-2)
works.snowe
12/13/2019, 5:36 PMKroppeb
12/13/2019, 6:04 PMsnowe
12/13/2019, 6:06 PMsnowe
12/13/2019, 6:07 PM