changeset 319 | b84ea52bfd8f |
parent 278 | 0c2481cd8b1c |
child 320 | cdfb2ce30a3d |
--- a/progs/lecture4.scala Tue Nov 12 00:41:00 2019 +0000 +++ b/progs/lecture4.scala Tue Nov 12 10:47:27 2019 +0000 @@ -434,7 +434,7 @@ // Conversions add a wrapper when a member of T is requested // from an instance of C. -//Another example +//Another example (TimeUnit in 2.13?) case class Duration(time: Long, unit: TimeUnit) { def +(o: Duration) = Duration(time + unit.convert(o.time, o.unit), unit)