The new package GeneratorArrays effectively converts a generator into a lazy form of a read-only abstract array.

The object `array(f(i) for i in a)`

can be used like `[f(i) for i in a]`

without using an extra array for storage. If `a`

is an `AbstractArray`

it is equivalent to `MappedArrays.mappedarray(f, a)`

.

Example:

```
julia> g = ( i - j for i in 1:5, j in 2:4)
Base.Generator{Base.Iterators.ProductIterator{Tuple{UnitRange{Int64},UnitRange{Int64}}},var"#56#57"}(var"#56#57"(), Base.Iterators.ProductIterator{Tuple{UnitRange{Int64},UnitRange{Int64}}}((1:5, 2:4)))
julia> array(g)
5Ă—3 GeneratorArrays.GeneratorArray{Int64,2,Base.Generator{Base.Iterators.ProductIterator{Tuple{UnitRange{Int64},UnitRange{Int64}}},var"#56#57"}}:
-1 -2 -3
0 -1 -2
1 0 -1
2 1 0
3 2 1
julia> array(g)[5,2]
2
```