Author | Message |
---|---|
rabbott
Posts: 1649
|
Posted 11:49 Oct 02, 2017 |
1. You should be able to talk about each functions individually. Each function should be preceded by comments that explain what it accomplishes. This would be something like the comments you would find with library functions. They don't tell you how the function works but what it computes. 2. After talking about what a function accomplishes we go on to talk about how it gets that job done. We look at the code and explain how it works. The explanation should be in terms of the functions that are called. But when talking about those functions, talk about what they accomplish for the function in which they are called, not how they do their job. That discussion occurs when we talk about those functions individually. 3. We talk about one function at a time. We move on to talking about another function when we are finished with the current function. At that point there should be no need to come back to that function. Each function stands on its own and should be explained on its own. 4. You should be comfortable with lambda functions. Project 2 includes a number of lambda functions in Part 2. You should understand lambda functions, what they mean, and how they can be used. For example I can describe an addition function as "A function that takes two arguments, adds them together, and returns the result." That's an English language statement of a function. That statement can be translated into Haskell as Suppose I wanted to give it a name, say "add." I could write I have been asking people to do that. For example, suppose you have the function When I have asked people to express
So we can substitute that to the left of the If you have questions about this, please ask. Last edited by rabbott at
14:27 Oct 02, 2017.
|