The OpenD Programming Language

moveAt

Moves element at index i of r out and returns it. Leaves r[i] in a destroyable state that does not allocate any resources (usually equal to its .init value).

Examples

auto a = [1,2,3,4];
foreach (idx, it; a)
{
    assert(it == moveAt(a, idx));
}

Meta