Skip to content

Commit

Permalink
Merge pull request #682 from valterbergstrand/master
Browse files Browse the repository at this point in the history
substituted syntax to promote consistency
  • Loading branch information
bjornregnell authored Sep 30, 2022
2 parents acf0f15 + 84939ad commit 1d11e8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slides/body/lect-w06-matching.tex
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@
case Vector(Gurka(v, true)) => s"en rutten gurka som väger $v"
case Vector(g) => s"exakt en grönsak: $g"
case Vector(g1, g2) => s"exakt två grönsaker: $g1, $g2"
case g +: gs => s"först en $g och sedan svansen: $gs"
case Vector(g, gs*) => s"först en $g och sedan svansen: $gs"
\end{Code}
Vad händer om du byter ordning på andra och tredje mönstret?
\code{Vector(g, gs*)} kan också skrivas som \code{g +: gs}
\end{Slide}

\begin{Slide}{Matchning på tupler}
Expand Down

0 comments on commit 1d11e8e

Please sign in to comment.