1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Ranges (ie: for (int a in 0..<count) for (int i in 1…10))

This commit is contained in:
Brian Fiete 2021-07-21 07:48:37 -07:00
parent e561a26695
commit 465050b81d
11 changed files with 418 additions and 18 deletions

View file

@ -0,0 +1,43 @@
using System.Collections;
using System.Diagnostics;
namespace System
{
struct Range
{
protected int mStart;
protected int mEnd;
public this()
{
mStart = 0;
mEnd = 0;
}
public this(int start, int end)
{
Debug.Assert(end >= start);
mStart = start;
mEnd = end;
}
}
struct ClosedRange
{
protected int mStart;
protected int mEnd;
public this()
{
mStart = 0;
mEnd = 0;
}
public this(int start, int end)
{
Debug.Assert(end >= start);
mStart = start;
mEnd = end;
}
}
}