import std.stdio;
void func(T)(T[] a)
{
foreach(ref v; a)
{
v *= v;
}
}
void main()
{
int[] a = [1, 2, 3, 4, 5];
a[1..4].func();
writeln(a);
}
aW1wb3J0IHN0ZC5zdGRpbzsKCnZvaWQgZnVuYyhUKShUW10gYSkKewoJZm9yZWFjaChyZWYgdjsgYSkKCXsKCQl2ICo9IHY7Cgl9Cn0KCnZvaWQgbWFpbigpCnsKCWludFtdIGEgPSBbMSwgMiwgMywgNCwgNV07CglhWzEuLjRdLmZ1bmMoKTsKCXdyaXRlbG4oYSk7Cn0=