public MaybeResult <PlatformStreamsDto, StreamProviderError> Map( YouTubeSearchDto videoSearchResults, MaybeResult <IEnumerable <YouTubeVideoDto>, StreamProviderError> videoDetailResults, MaybeResult <IEnumerable <YouTubeChannelDto>, StreamProviderError> videoChannelResults) { return(videoDetailResults.Chain(videosResult => { return videoChannelResults.Select(channelResults => { var videoDetails = videosResult.ToDictionary(v => v.id, v => v.liveStreamingDetails); var videoChannels = channelResults.ToDictionary(c => c.id, c => c.snippet); return ToStreams(videoSearchResults, videoChannels, videoDetails); }); })); }