size<T> function
- ImmutableList<
T> list
Returns the size of the ImmutableList.
Takes an ImmutableList instance and returns its length.
Example:
final il = ImmutableList<int>([1, 2, 3, 4]);
final length = size(il);
print(length); // Outputs: 4
Implementation
int size<T>(ImmutableList<T> list) => list.items.length;