On Sat, Jun 11, 2022 at 12:36:15AM +0200, Ralf Hemmecke wrote:
> (13) -> [k for k in 4.. by -3 while k>0]
>
> (13) [4, 1]
> Type: Stream(Integer)
> (14) -> [k for k in 4.. by -3 while k>0 for m in 1..29]
> There are no library operations named swhile
> Use HyperDoc Browse or issue
> )what op swhile
> to learn if there is any operation containing " swhile " in its
> name.
>
> Cannot find a definition or applicable library operation named
> swhile with argument type(s)
> (Record(part1: Integer,part2: Integer) -> Boolean)
> InfiniteTuple(Record(part1: Integer,part2: Integer))
>
> Perhaps you should use "@" to indicate the required return type,
> or "$" to specify which version of the function you need.
>
> Shouldn´t I be able to freely mix for and while in a parallel iteration?
Well, for some reason your iteration triggered stream case.
And AFAICS the error message is true: there is no 'swhile'
in algebra. It seems that corresponding code remains
unimplemented. To say the truth, implementation of this
looks like can of worms. And we have a lot of things that
could be improved, so this one waits for more attention.
To say the truth, getting iteration for generators to work seem
more important. And IMO interation over stream should be
special case of interation using generators. But when I
looked at this there seemed to be almost no interest
(you basicaly wrote that if our generators can not do
all what Aldor generators do, then they are not interesting).
So some initial work is done, but I moved to other things.
--
Waldek Hebisch
--
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/20220611032536.GA8376%40fricas.math.uni.wroc.pl.