CS 119 Lab 1 – Simple Haskell Expressions
Objectives
Perform the following tasks in the order given.
| Assignment: Use the Words module to write a function: insertAnd :: Language -> Language insertAnd s = ... which inserts the word "and" as the next to last word of the sentence. For example, insertAnd (sent "John Bill Wayne Fred") => [John Bill Wayne and Fred] |
| Assignment: Modify the function plural so that it works correctly for words ending in a vowel followed by the letter "y" – e.g. "toy". Also modify the function so that it works for words ending in "x" like "box". |
| Assignment: Define functions halfTurn and quarterTurnLeft which will rotate a quilt appropriately. |
| Assignment: Define a function sideBySide which will combine two quilts next to each other, with the first quilt on the left and the second quilt on the right. Make sure the the two quilts stay in their original orientation. |
| Assignment: Define a function pinwheel where draw (pinwheel testBB) will look like : ![]() Test out pinwheel on some other quilts. |