/// <summary> /// Returns the first element of a sequence, as a future value. /// </summary> /// <typeparam name="TSource">The type of the elements of source.</typeparam> /// <param name="source">The sequence to return the first element of.</param> /// <returns>The first element in the specified sequence, as a future value. /// The actual value can only be retrieved after the source has indicated the end /// of its data. /// </returns> public static IFuture <TSource> First <TSource>(this IDataProducer <TSource> source) { return(source.First(x => true)); }