X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek1.mdwn;h=5ab30bcb0617e8aed9f994a8e641d0de6151ddc9;hp=4e1f0ddaca7f39968d1adfc60956289968cbeaf1;hb=a7c26ba13dbf72718f66e8814f4cf74ec4647000;hpb=8f3ef33f3f9bc089b5590f660517977b1b3c0972 diff --git a/topics/week1.mdwn b/topics/week1.mdwn index 4e1f0dda..5ab30bcb 100644 --- a/topics/week1.mdwn +++ b/topics/week1.mdwn @@ -81,7 +81,7 @@ I've started throwing in some **variables**. We'll say variables are any express x? xs -We'll follow a *convention* of using variables with short names and a final `s` to represent collections like sequences (to be discussed below). But this is just a convention to help us remember what we're up to, not a strict rule of the language. We'll also follow a convention of only using variables ending in `?` to represent functions that return a boolean value. Thus, for example, `zero?` will be a function that expects a single number argument and returns a boolean corresponding to whether that number is `0`. `odd?` will be a function that expects a single number argument and returns a boolean corresponding to whether than number is odd. Above, I suggested we might use `lessthan?` to represent a function that expects *two* number arguments, and again returns a boolean result. +We'll follow a *convention* of using variables with short names and a final `s` to represent collections like sequences (to be discussed below). But this is just a convention to help us remember what we're up to, not a strict rule of the language. We'll also follow a convention of only using variables ending in `?` to represent functions that return a boolean value. Thus, for example, `zero?` will be a function that expects a single number argument and returns a boolean corresponding to whether that number is `0`. `odd?` will be a function that expects a single number argument and returns a boolean corresponding to whether than number is odd. Above, I suggested we might use `lessthan?` to represent a function that expects *two* number arguments, and again returns a boolean result. We also conventionally reserve variables ending in `!` for a different special class of functions, that we will explain later in the course.