findAppointments :: Day -> (Appointment -> Bool) -> WD [Appointment]
findAppointments lastDay p = do
  appts <- findFirstAppointments lastDay
  if null appts
    then return []
    else do
      let appts'
            = filter
              (allP [ (<= nextDayStartTime lastDay) . time, p ])