In the lists labs and your previous assignments, you've been exposed to HOF blocks like map, keep, and combine. You likely used them to carry out relatively simple tasks, like summing a list with combine, or filtering based on word length with keep. In this lab, you're going to attack some more complicated problems with the help of HOFs. In addition, you're going to see how functions can be treated as data, and how you can define your own blocks that take in functions as input, just like map, keep, and combine do.

Here is the starter code for this lab: Lab 9 starter code

The following blocks are graded:

For all the required blocks below, you may use only HOF blocks. Recursion and iteration are not allowed.

Before we dive into the more intense HOFs problems, let's warm up with a few non-HOFs problems (meaning that you are allowed to use iteration or recursion for these blocks). These simpler blocks will come in handy later when we attempt the more complex problems. We realize you may have built these blocks before, but you should build them again anyway! If you already know how to do them cditeratively, try them recursively, or vice versa!

Warm-up

First, create the block
List all numbers between min and max
that takes in a minimum and a maximum, and reports a list of numbers from the minimum to the maximum (both inclusive). So, for example,
List all numbers between 5 and 8
would report the list
(5, 6, 7, 8)
Please do NOT use the "numbers from () to ()" block in your implementation!

Next, create the block
word to list
that that takes in a word and reports a list of all of the characters in that word. So, for example,
word to list 'berkeley'
would report the list
(b, e, r, k, e, l, e, y)
Similarly, please do not use the "word->list" block that is already provided in Snap!