Skip to content

Instantly share code, notes, and snippets.

@ae6rt
Created March 5, 2012 02:33
Show Gist options
  • Save ae6rt/1976128 to your computer and use it in GitHub Desktop.
Save ae6rt/1976128 to your computer and use it in GitHub Desktop.
Kotlin tuples
fun getRuntimeParams(args: Array<String>) : #(String?, String?) {
var t = 0
var targetListName : String? = null
var since : String? = null
while(t < args.size) {
if( args[t].equals("--list")) {
targetListName = args[++t]
}
if( args[t].equals("--since")) {
since = args[++t]
}
++t
}
return #(targetListName, since)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment