Create a function high-tides that consumes a list of tide structures tidelist and a number threshold and produces the list of day-time structures for each tide in tidelist with height greater than threshold. The order of day-time structures in the list produced should follow the order in the list consumed. Create a function high-tides that consumes a list of tide structures tidelist and a number threshold and produces the list of day-time structures for each tide in tidelist with height greater than threshold. The order of day-time structures in the list produced should follow the order in the list consumed. @Computer Science
I'm assuming the input list of tide structures contains the desired day-time structure. Create an empty output list. Iterate over the input list. Apply the test (tide height > threshold). For the ones that pass, add the day-time from that tide to the output list. When you're done iterating, return the output list.
Join our real-time social learning platform and learn together with your friends!