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.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.18 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.17 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.16 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.15 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.14 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.13 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.12 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.11 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.10 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.9 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.8 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.7 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.6 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.5 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.4 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.3 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.2 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.1 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt
trackler-2.0.5.0 tracks/kotlin/exercises/leap/src/example/kotlin/Year.kt