Skip to content

Commit

Permalink
Merge pull request #680 from valterbergstrand/master
Browse files Browse the repository at this point in the history
corrected a typo
  • Loading branch information
bjornregnell authored Sep 30, 2022
2 parents 931cfcb + dccf096 commit acf0f15
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 acf0f15

Please sign in to comment.