I tried the same with getTypeInst but got V symbol instead of an expansion :/
Any problem on Earth can be solved with the careful application of
meta-programming. The trick is not to be around when the AST spec changes. :o)
import macros
type Range[V] = object
v: V
slice: Slice[int]
var r: Range[seq[int]] = Range[seq[int]](v: @[0,
Regarding lazy ranges, @timotheecour was interested in implementing D ranges in
Nim, see
[https://github.com/timotheecour/vitanim/tree/master/drange/src/drange](https://github.com/timotheecour/vitanim/tree/master/drange/src/drange).
I often struggled with the same need, Nim offers genericHead bu
This is a type to represent lazy ranges parametrized by the container type:
type Range[V] = object
v: V
slice: Slice[int]
var r: Range[seq[int]] = Range[seq[int]](v: @[0, 10, 20, 30, 40], slice:
2..3)
# r represents the range [20, 30]
var x : r.v[0]