X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek1_advanced_notes.mdwn;h=2137d114a5afeb4fdb27dcdce05fc194fcc8997b;hp=99d8a8b0a72f722723a9419c1f7dfafb1200312c;hb=a79e0e734113a0d29f064fc8fb2ae7258e246e55;hpb=deb5d166e62255d1578ca153f48ff50ba4415aaf diff --git a/topics/week1_advanced_notes.mdwn b/topics/week1_advanced_notes.mdwn index 99d8a8b0..2137d114 100644 --- a/topics/week1_advanced_notes.mdwn +++ b/topics/week1_advanced_notes.mdwn @@ -2,6 +2,7 @@ These are some advanced notes extending the material presented this week. Don't [[!toc]] + ### 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: @@ -129,6 +130,7 @@ Both of these strategies work. But they are a bit inefficient. I said you didn't end + ### $ 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 & 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: