profile-img
Alastair Donaldson

@afd_icl

Professor of Programming Languages at Imperial College London

calendar_today20-01-2014 13:48:59

3,6K Tweets

2,4K Followers

454 Following

Alastair Donaldson(@afd_icl) 's Twitter Profile Photo

Kotliners: what d'you think this prog should print when passed empty args?

fun getText(arg: Int): String {
return if (arg == 0) {
'A'
} else if (arg == 1) {
'B'
} else {
'C'
} + '\n'
}

fun main(args: Array<String>) {
println(getText(args.size) + '!!!')
}

account_circle