Sha256: 4df5414b976399dd2e93b490471ea3216ad4d3895bd4b28d218d6e9673e4f45f

Contents?: true

Size: 169 Bytes

Versions: 165

Compression:

Stored size: 169 Bytes

Contents

case class Year(year: Int) {
  lazy val isLeap: Boolean = divisibleBy(4) && (divisibleBy(400) || !divisibleBy(100))

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

Version data entries

165 entries across 165 versions & 1 rubygems

Version Path
trackler-2.1.0.9 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.8 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.7 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.6 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.5 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.4 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.3 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.2 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.1 tracks/scala/exercises/leap/example.scala
trackler-2.1.0.0 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.55 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.54 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.53 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.52 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.51 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.50 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.49 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.48 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.47 tracks/scala/exercises/leap/example.scala
trackler-2.0.8.46 tracks/scala/exercises/leap/example.scala