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

Edit detail for #108 InfiniteTuple and Stream revision 1 of 3

1 2 3
Editor:
Time: 2007/11/17 21:52:18 GMT-8
Note: property change

changed:
-
Section 5.6 An Example: [Streams] of Primes

  of the Axiom Book says:
"This is how you use generate to generate an infinite stream of primes."
\begin{axiom}
primes := generate(nextPrime,2)
\end{axiom}

but the result is an InfiniteTuple, not a Stream. The domain
InfiniteTuple is not documented in the book.

To create a stream one must explicitly write:
\begin{axiom}
primes := generate(nextPrime,2)$Stream Integer
\end{axiom}

or
\begin{axiom}
primes := construct generate(nextPrime,2)
\end{axiom}



Submitted by : (unknown) at: 2007-11-17T21:52:18-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

Section 5.6 An Example: [Streams]? of Primes

of the Axiom Book says: "This is how you use generate to generate an infinite stream of primes."

fricas
primes := generate(nextPrime,2)
Line 1: primes := generate(nextPrime,2) ..........A Error A: syntax error at top level Error A: Improper syntax. 2 error(s) parsing

but the result is an InfiniteTuple?, not a Stream. The domain InfiniteTuple? is not documented in the book.

To create a stream one must explicitly write:

fricas
primes := generate(nextPrime,2)$Stream Integer
Line 1: primes := generate(nextPrime,2)$Stream Integer ..........A Error A: syntax error at top level Error A: Improper syntax. 2 error(s) parsing

or

fricas
primes := construct generate(nextPrime,2)
Line 1: primes := construct generate(nextPrime,2) ....................A Error A: Improper syntax. 1 error(s) parsing