pdateScheduleHelper
    :: ForFeedElement e
    => (FeedMessage -> P'.Seq e)
    -> FeedMessage
    -> [ScheduleItem]
    -> [ScheduleItem]
updateScheduleHelper getter fm schedule =
    Map.elems $ execState (mapM updateFeedElement $ getter fm) scheduleMap
  where
    scheduleMap = Map.fromList $ toMap <$> schedule
    toMap x = (tripId x, x)

updateScheduleHelper
    :: ForFeedElement e
    => (FeedMessage -> P'.Seq e)
    -> FeedMessage
    -> [ScheduleItem]
    -> [ScheduleItem]
updateScheduleHelper getter fm schedule =
    Map.elems $ execState (mapM updateFeedElement $ getter fm) scheduleMap
  where
    scheduleMap = Map.fromList $ toMap <$> schedule
    toMap x = (tripId x, x)
updateScheduleHelper getter fm schedule =
    Map.elems $ execState (mapM updateFeedElement $ getter fm) scheduleMap
  where
    scheduleMap = Map.fromList $ toMap <$> schedule
    toMap x = (tripId x, x)