Skip to content

Instantly share code, notes, and snippets.

Simon Tse simon-tse-hs

Block or report user

Report or block simon-tse-hs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simon-tse-hs
simon-tse-hs / CollectionAndSequence.kt
Last active Jun 28, 2017
CollectionAndSequence.kt
View CollectionAndSequence.kt
package com.simon.sample
import com.simon.sample.CollectionRange.to100
import com.simon.sample.CollectionRange.to1000
import com.simon.sample.CollectionRange.to10000
import com.simon.sample.CollectionRange.to100000
import com.simon.sample.CollectionRange.to1000000
import kotlin.system.measureTimeMillis
enum class CollectionType {
@simon-tse-hs
simon-tse-hs / Elvis.kt
Created Jun 13, 2017
Kotlin Elvis operator code that caused Proguard to fail
View Elvis.kt
private fun doubleup(num: Int) : Int = num * 2
fun addOrDouble(a: Int, b: Int?): Int = b?.let { it + a } ?: doubleup(a)
You can’t perform that action at this time.