summaryrefslogtreecommitdiff
path: root/10-pattern-matching.md
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-03-10 16:30:45 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-03-10 16:31:47 -0700
commitdf2f3f7cd69bb042a29b4fcea3ab81d641f17906 (patch)
treeecbbdbe8603b9390022e7032fbe07570843020c0 /10-pattern-matching.md
parent839fd6e55b178b5c2a7aeaa7c9a542fd3637fe01 (diff)
downloadscala-df2f3f7cd69bb042a29b4fcea3ab81d641f17906.tar.gz
scala-df2f3f7cd69bb042a29b4fcea3ab81d641f17906.tar.bz2
scala-df2f3f7cd69bb042a29b4fcea3ab81d641f17906.zip
github markdown: headers
Diffstat (limited to '10-pattern-matching.md')
-rw-r--r--10-pattern-matching.md18
1 files changed, 6 insertions, 12 deletions
diff --git a/10-pattern-matching.md b/10-pattern-matching.md
index 85639c8f7c..b3c1db3499 100644
--- a/10-pattern-matching.md
+++ b/10-pattern-matching.md
@@ -1,8 +1,6 @@
-Pattern Matching
-================
+# Pattern Matching
-Patterns
---------
+## Patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar}
Pattern ::= Pattern1 { ‘|’ Pattern1 }
@@ -320,8 +318,7 @@ A pattern $p$ is _irrefutable_ for a type $T$, if one of the following applies:
of type $T$ has argument types $T_1 , \ldots , T_n$, and each $p_i$ is
irrefutable for $T_i$.
-Type Patterns
--------------
+## Type Patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar}
TypePat ::= Type
@@ -373,8 +370,7 @@ a lower case letter. However, the predefined primitive type aliases
`long`, `float`, and `double` are not
classified as type variable patterns.
-Type Parameter Inference in Patterns
-------------------------------------
+## Type Parameter Inference in Patterns
Type parameter inference is the process of finding bounds for the
bound type variables in a typed pattern or constructor
@@ -531,8 +527,7 @@ are inferred in the same way as for the typed pattern
function's declared result type, `Number`.
-Pattern Matching Expressions
-----------------------------
+## Pattern Matching Expressions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar}
Expr ::= PostfixExpr `match' `{' CaseClauses `}'
@@ -649,8 +644,7 @@ possibility of a `MatchError` being raised at run-time.
conforms to its expected type, `T`.
-Pattern Matching Anonymous Functions
-------------------------------------
+## Pattern Matching Anonymous Functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar}
BlockExpr ::= `{' CaseClauses `}'