In D language, what is the shortest way to construct an array from a given range?
Let I have an iterator i. How to make an array of its elements (in order)?
i
.array (from std.array).
.array
Example:
import std.array : array; import std.range : iota; int[] arr = 10.iota.array;