Notes on Exercise ("Project") 2.B
There are a few details that should be noted about how you write your
code for makeImperative
and its helper functions:
- When making strings, your code should have straight up-and-down
quotes like
"
, not slanted quotes like “
and ”.
If the editor you're using automatically makes quotes slanted (often called
"smart quotes"), you'll need to turn it off.
Let me know if you need help with that.
For example, here are instructions about how to disable smart quotes
for recent versions of MacOS.
- The order in which the words and phrases appear matters.
In particular, note that the adverb (if any) should appear before
the prepositional phrase (if any).
Thus the big dog quickly chased a red ball through the bright field
should be turned into
chase a red ball quickly through the bright field, o big dog!
- As usual, to test your code in the interpreter, you'll need to put all the
supporting datatypes and functions (the code from class starting with
(* "Feature presentation" begins here *)
),
but not when submitting your solution.
On the other hand, when you submit, don't forget to include the
helper functions that you wrote or completed, namely
imperativeT(), imperativeI(), imperativeL(),
and printVocative()
in addition to, of course,
the function makeImperative()
.
- Although getting the spacing and punctuation right is a good idea,
your submitted code will not be tested on that.
The grading system will accept code that produces strings with
extra or missing spaces and punctuation.
Thomas VanDrunen
Last modified: Wed Jan 24 11:30:46 CST 2018