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.6.20 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.19 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.18 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.17 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.16 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.15 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.14 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.13 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.12 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.11 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.10 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.9 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.8 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.7 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.6 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.5 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.4 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.3 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.2 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.6.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt