Proposed task list for days-in-range

For the days-in-range function, here’s a possible task list, with annotations (after ==>) on how to implement each task:

  1. determine whether a temperature is with a range of two other numbers

    ==> write a lam or a named function for this

  2. determine whether all temps in a list are within a range

    ==> write a helper such as

    all-in-range(lst :: List<Number>, low :: Number, high :: Number) -> Boolean

  3. find the days for which all temps are within a range

    ==> filter the data using all-in-range

  4. count the days from the previous step

    ==> Use L.length

You could also choose to combine tasks 3 and 4 into something like the following: