This assignment is due on Tuesday, March 8 at 11:59pm. Submit it using Handin as assignment lecture18.
What is the name of the function?
How many inputs does the function take? What are their names?
How many inputs does the signature take? What are their names?
; Exercise 1 ; The function ??? has ??? inputs, called ??? and ???. ; Its signature has ??? inputs, called ??? and ???.
Design a function filter-without-a that takes a list of strings as input and returns the list of all the given strings that do not contain the letter "a". Hint: What is X? The built-in functions not and string-contains? will help.
Design a function filter-x<y that takes a list of Posns as input and returns the list of all the given Posns whose X coordinate is less than their Y coordinate. Hint: What is X? Design a helper function that follows the template for processing a Posn.
Remember the function move-invaders from Lecture 14: Built-in structures? It takes and returns a [ListOf Posn]. It increases each Y coordinate by 1. Design it again, still named move-invaders. Hint: What is X and what is Y? Design a helper function that follows the template for processing a Posn.
The code written in the videos above is available for your reference. To download it, don’t use “Save Page As” or “Save As”; use “Save Link As” or “Download Linked File” in your Web browser. If you can’t find the command, try right-clicking or two-finger-tapping or long-pressing.
Exercise 6. Design a function lengths-without-e that takes a list of strings and returns a list of numbers, which are the lengths of those strings that do not contain the letter "e". Use map and filter, rather than following the function template for processing a list.