While implementing, I have a problem with

x: Stream Integer := [k for k in 1..29]
st := x(2..-2 by -1);

The creation itself will succeed.
Now what exactly should st be?

Naively, that would be a stream consisting of 5 elements

  st := [x(2), x(1), x(0), x(-1), x(-2)]              (*)

Clearly the only sensible stream that I can return is

  st2 := [x(2), x(1)]                                (**)

In most aspects that stream st2 behaves in the same way as st,
except that, because of the way st was created, I would expect
complete(st) to result in an error, because completion would
try to access x(0) and thus fail while, of course, entries(complete(st2)) works perfectly fine and gives a list of two elements.

That is the reason why I am basically hesitating to say that
x(n .. m by -1) for m < minIndex(x) is the same as x(n.. by -1) is the same as x(n..minIndex(x) by -1).

A fine detail, but it should be clarified.
I am somewhat in favour of (**). That is also easier to implement.

Waldek, what do you think? What do others think?

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/ff321911-48e7-3a00-b39f-84d4f375ca25%40hemmecke.org.

Reply via email to