F# has sequences that allows to create sequences:
seq { 0 .. 10 }
Create sequence of numbers from 0 to 10.
Is there someth
I have these functions in my code
private static IEnumerable FromZero(this int count)
{
if (count <= 0)
yield break;
for (var i = 0; i < count; i++)
{
yield return i;
}
}
private static IEnumerable FromOne(this int count)
{
if (count <= 0)
yield break;
for (var i = 1; i <= count; i++)
{
yield return i;
}
}
This helps to reduce some for(i) code.