Sha256: d22c96c46152a20740cf83743144d900ebae6b12cca85c791e07f01c174aa482

Contents?: true

Size: 190 Bytes

Versions: 396

Compression:

Stored size: 190 Bytes

Contents

data class Year(private val year: Int) {
    val isLeap: Boolean by lazy { divisibleBy(4) && (divisibleBy(400) || !divisibleBy(100)) }

    private fun divisibleBy(i: Int) = year % i == 0
}

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.0.0.5 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.0.4 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.0.3 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.0.2 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.0.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.0.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.4.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.4.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.3.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.2.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.2.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.1.2 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.1.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.1.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.0.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-1.0.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt