|
|
last edited 7 years ago by oldk1331 |
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}
of the Axiom Book says: "This is how you use generate to generate an infinite stream of primes."
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:
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
primes := construct generate(nextPrime,2)
Line 1: primes := construct generate(nextPrime,2) ....................A Error A: Improper syntax. 1 error(s) parsing