login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #328 AXIOM interpreter cannot iterate over Stream revision 1 of 2

1 2
Editor:
Time: 2007/11/17 22:27:06 GMT-8
Note:

changed:
-
\begin{axiom}
L:=generate(s+->s+1,1.1)$Stream Float
for i in L repeat
  output i+0.01
\end{axiom}
But of course L is a Stream and iteration within list
comprehension works.
\begin{axiom}
P:=[i+0.01 for i in L]
\end{axiom}

Submitted by : (unknown) at: 2007-11-17T22:27:06-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

fricas
L:=generate(s+->s+1,1.1)$Stream Float
Line 1: L:=generate(s+->s+1,1.1)$Stream Float ...A Error A: syntax error at top level Error A: Improper syntax. 2 error(s) parsing for i in L repeat output i+0.01
FriCAS cannot iterate with i over your form now. Perhaps you should try using a conversion to make sure your form is a list or stream, for example.

But of course L is a Stream and iteration within list comprehension works.

fricas
P:=[i+0.01 for i in L]
FriCAS cannot iterate with i over your form now. Perhaps you should try using a conversion to make sure your form is a list or stream, for example.