value · System

ListIterator<T>

public value ListIterator<T>

The items of a list, in order.

Kind
value
Namespace
System
Assembly
System.Core
Access
public
Source file
List.ant

Type parameters

NameConstraints
Tany type

Constructors

new(T[] items, i32 count)
#

Properties

T Current { get; }
#

read-only

Methods

Next() : bool
#

Private and internal members (3)

T[] items
#

private

i32 count
#

private

i32 index
#

private

Source

ListIterator<T> as Antril, decompiled from its Larva HIR.

System.ListIterator.ant
// System.ListIterator — System.Core (decompiled from Larva HIR)

into namespace System
{
	/// The items of a list, in order.
	public value ListIterator<T>
	{
		T[] items;
		i32 count;
		i32 index;

		public:
			new(T[] items, i32 count)
			{
				this.items = items;
				this.count = count;
				index = -1;
			}

			Next() : bool
			{
				index++;
				return index < count;
			}

			T Current
			{
				get => items[index];
			}
	}
}
Esc