Alphie and Betsy are trying to build a block to generate a list of whole numbers from n down to 1.
Alphie: I used a script variable and kept shoving a new number at the beginning of the list using for.
Betsy: Let's try it!
They take it out for a spin.
Alphie: Oh. Not what I expected...
Fix Alphie and Betsy'scountdown script so that it does what it's supposed to do.
Gamal joins the group and looks over Alphie's shoulder.
Gamal: Wow, it would never have occurred to me to write it that way! You want countdown (5) to report the list {5, 4, 3, 2, 1}. But countdown (4) is {4, 3, 2, 1}, so all you have to do is stick a 5 in front:
Gamal's description of his algorithm didn't mention the if in his code. What would happen if he left that part out? Why?