days_until_cooler

You have a list of daily temperatures recorded in ascending order of days, right? In degrees Celsius, if you please. No, not Martian days, Earth days! Your job is, for each day, to find out how many days you'll have to wait until the next cooler day. Is it tomorrow? Or three days later? Or maybe there's no cooler day in sight and that calls for a -1.

Just bear in mind the input list of temperatures isn't picky, it could be empty, only contain one record, or have several days with the same temperature. And how are we presenting the results? A list! For each day, indicate the wait time until the next cooler day, or a -1 if the future's looking too hot to handle