Skip to content

Commit

Permalink
corrected a typo
Browse files Browse the repository at this point in the history
added `s` to make a string into a string polarization on line 197
  • Loading branch information
valterbergstrand authored Sep 30, 2022
1 parent 87a1f71 commit dccf096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slides/body/lect-w06-matching.tex
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
case Gurka(v, false) => "gott, väger " + v
case Gurka(_, true) => "inte gott"
case Tomat(v, r) => (if r then "inte " else "") + s"gott, väger $v"
case _ => "okänd grönsak: $g"
case _ => s"okänd grönsak: $g"
\end{Code}

Konstruktormönster ''\Emph{plockar isär}'' det som matchas och binder variabler till de attribut som finns i case-klassens konstruktor.
Expand Down

0 comments on commit dccf096

Please sign in to comment.