add anchor for #dollar
[lambda.git] / topics / week1_advanced_notes.mdwn
index dd143fc..2137d11 100644 (file)
@@ -2,6 +2,7 @@ These are some advanced notes extending the material presented this week. Don't
 
 [[!toc]]
 
+<a id=multivalues></a>
 ### More on multivalues ###
 
 A multivalue is a series of *zero or more* values. They are the result of evaluating expressions that consist of *zero or more* expressions, separated by commas, and enclosed in parentheses. So these expressions evaluate to multivalues:
@@ -47,7 +48,7 @@ In OCaml, there are no until-the-end-of-the-line comments. The only comments sta
 
 I agree it's annoying that these conventions are so diverse. There are plenty other commenting conventions out there, too.
 
-
+<a id=funct-declarations></a>
 ### Matching function values ###
 
 A function value doesn't have any structure---at least none that's visible to the pattern-matching system. You can only match against simple patterns like `_` or the variable `f`.
@@ -129,6 +130,7 @@ Both of these strategies work. But they are a bit inefficient. I said you didn't
     end
 
 
+<a id=dollar></a>
 ### $ Syntax ###
 
 Haskell has a useful bit of syntax that we will adopt. They use `$` as an infix operator that has the same kind of effect as Russell &amp; Whitehead's period. It is semantically inert, and only affects grouping. It enables you to avoid some parentheses in lots of situations. For example, if you want to check that a sequence `xs` is not empty, you'd express that like this: