I am not so sure what to do for Stream and n<0.
The result is actually a finite stream, but it would
mean to expand the input stream up to A just to get
the first element of the result. Doable, but should
it be implemented, i.e. who would ever use that?
I think that for stream error in case of negative increment
is reasonable.
In the end it was easier than I thought.
The original implementation in LazyStreamAggregate used
(not index?(low, x)) or (not index?(high, x))
to check whether the indices are OK. Since that already expands the
stream up to that point, it should not be a problem for negative step sizes.
See pull-request.
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/6f3cb996-59b8-1b30-ab62-34970d6049a1%40hemmecke.org.