Concatenation of array and range

Sergey kornburn at yandex.ru
Sun Jan 19 19:22:48 UTC 2025


On Sunday, 19 January 2025 at 18:57:51 UTC, Samuel Redding wrote:
> I haven't found a way to do this. The only way to do it seems 
> to extend "list1" and then iterate over the range and insert 
> the elements.

```d
import std;

void main() {
     ulong[] list1 = [1, 2, 3];
     ulong a = 7;
     ulong b = 10;
	list1 ~= iota(a,b).array;
     writeln(list1); // [1, 2, 3, 7, 8, 9]
}
```


More information about the Digitalmars-d mailing list