|
3 | 3 | public static partial class SuperEnumerable
|
4 | 4 | {
|
5 | 5 | /// <summary>
|
6 |
| - /// Returns a sequence of values consecutively generated by a generator function. |
| 6 | + /// Returns a sequence of values consecutively generated by a generator function. |
7 | 7 | /// </summary>
|
8 |
| - /// <typeparam name="TResult">Type of elements to generate.</typeparam> |
9 |
| - /// <param name="initial">Value of first element in sequence</param> |
| 8 | + /// <typeparam name="TResult"> |
| 9 | + /// Type of elements to generate. |
| 10 | + /// </typeparam> |
| 11 | + /// <param name="initial"> |
| 12 | + /// Value of first element in sequence |
| 13 | + /// </param> |
10 | 14 | /// <param name="generator">
|
11 |
| - /// Generator function which takes the previous series element and uses it to generate the next element. |
| 15 | + /// Generator function which takes the previous series element and uses it to generate the next element. |
12 | 16 | /// </param>
|
13 |
| - /// <returns>A sequence containing the generated values.</returns> |
14 |
| - /// <exception cref="ArgumentNullException"><paramref name="generator"/> is <see langword="null"/>.</exception> |
| 17 | + /// <returns> |
| 18 | + /// A sequence containing the generated values. |
| 19 | + /// </returns> |
| 20 | + /// <exception cref="ArgumentNullException"> |
| 21 | + /// <paramref name="generator"/> is <see langword="null"/>. |
| 22 | + /// </exception> |
15 | 23 | /// <remarks>
|
16 |
| - /// This function defers element generation until needed and streams the results. |
| 24 | + /// This function defers element generation until needed and streams the results. It is treated as an |
| 25 | + /// infinite sequence, and will not terminate. |
17 | 26 | /// </remarks>
|
18 |
| - /// <example> |
19 |
| - /// <code><![CDATA[ |
20 |
| - /// var result = SuperEnumerable.Generate(2, n => n * n).Take(5); |
21 |
| - /// ]]></code> |
22 |
| - /// The <c>result</c> variable, when iterated over, will yield 2, 4, 16, 256, and 65536, in turn. |
23 |
| - /// </example> |
24 |
| - |
25 | 27 | public static IEnumerable<TResult> Generate<TResult>(TResult initial, Func<TResult, TResult> generator)
|
26 | 28 | {
|
27 | 29 | Guard.IsNotNull(generator);
|
|
0 commit comments