1
0

Implement POP

This commit is contained in:
otya128
2016-12-14 20:34:31 +09:00
parent 23cea555e1
commit 96ea2e84e2
2 changed files with 41 additions and 0 deletions

View File

@@ -388,6 +388,17 @@ class Array(T)
array ~= v;
dim[0]++;
}
T pop()
{
if (dimCount != 1)
{
throw new TypeMismatch();
}
auto last = array[$ - 1];
array.length--;
dim[0]--;
return last;
}
@property void length(int size)
{
if (dimCount != 1)