> How about if we generalize makelist to take multiple indices
> and cut create_list entirely.
I agree that we should generalize makelist. But if we allow it to
take BOTH multiple indices and a range defined by i,lowval,highval we
run into the ambiguity I mentioned in my previous mail.
Something that would allow both in a much cleaner way would be some
sort of notation for an integer sequence, e.g. a .. b, so that you
could have
makelist( i*j, i, 1 .. 3, j, 3 .. 4)
Then there wouldn't be this disaster of the interpretation of the
arguments depending on their value. The simple way to implement this
would be to have a..b expand to [a, a+1, ... , b]. A more
sophisticated implementation (but which would require a lot more work
to do fully) would have ".." remain unexpanded.
The main hesitation I have about using ".." in this way is that it
covers one rather special case, not including other step sizes etc.
It gets complicated to have (2..5)/3 represent [ 2/3, 1, 4/3, 5/3]
without expanding it, because there are lots of other cases, e.g.
reverse(2..5), concat(2..5, 3..7), etc., none of which are currently
simplifying functions.
-s