Hi, some random-but-inspired-by-real-work thoughts about gretl's lists:
-- The fact that you can use index ranges with lists doesn't seem to be
documented, or is it? For example, a little bit to my amazement, this works:
<hansl>
open denmark
list L = LRM LRY IBO
ols L[1] const L[2 : nelem(L)]
</hansl>
(And in the future I guess even with "end" in place of "nelem(L)".)
Maybe it should be mentioned in the list chapter.
-- What isn't possible yet is to operate on all list elements at once,
without using an explicit loop. What I mean is, wouldn't it be nice if
one could do something like:
list L2 = L .- x # not possible
to do the equivalent of the following loop code:
<hansl>
list L2 = null
loop foreach i L
L2 += $i - x
endloop
</hansl>
(I guess there's an overlap with the feature request to have a new
apply() function for generic elementwise operation. But I think using
the dot-operators would feel very natural.)
Just some ideas - thanks
sven