Stephan's Stuff

Adventures in Android Development

Hello World

Some hello worlds

1
2
3
fun main(args: Array<String>) {
   println("Hello World!")
}
1
2
3
4
5
public class HelloWorld {
       public static void main (String[] args) {
             System.out.println("Hello World!");
       }
}

Some nice Kotlin functions

1
2
3
4
5
public inline fun repeat(times: Int, action: (Int) -> Unit) {
    for (index in 0..times - 1) {
        action(index)
    }
}
1
public inline fun <T, R> with(receiver: T, block: T.() -> R): R = receiver.block()

Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.