lunduniversity / introprog-scalalib

Scala library with simple-to-use utilites for students of introductory programming. http://cs.lth.se/pgk/api
BSD 2-Clause "Simplified" License
60 stars 14 forks source link

7.1.36 repl contains typos #35

Closed IndigoWilke closed 3 years ago

IndigoWilke commented 3 years ago

The example where the repl is shown in chapter 7 part 1 subpart 36 needs some fixing As it is now this is how it looks:

scala> type Pt = (Int, Int) scala> def distToOrigo(pt: Pt): Int = math.hypot(pt._1, pt._2) scala> type Pts = Vector[Pt] scala> def firstPt(pts: Pts): Pt = pts.head scala> val xs: Pde3,3)) scala> firstPt(xde res0: Pt = (1,1)de

Last three lines needs some fixing

bjornregnell commented 3 years ago

this regards https://github.com/lunduniversity/introprog/issues

fixing this there by this commit: https://github.com/lunduniversity/introprog/commit/c6fa62b7914373f980baff474bdbac3a30a4d421