|
|
last edited 7 years ago by oldk1331 |
1 2 3 | ||
Editor: oldk1331
Time: 2017/07/12 14:20:02 GMT+0 |
||
Note: fix the code for FriCAS: 'generate' -> 'stream' |
added: In FriCAS, the function 'generate' has been renamed to 'stream'. changed: -primes := generate(nextPrime,2) primes := stream(nextPrime,2) changed: -primes := generate(nextPrime,2)$Stream Integer primes := stream(nextPrime,2)$Stream Integer changed: -primes := construct generate(nextPrime,2) primes := construct stream(nextPrime,2)
of the Axiom Book says:
"This is how you use generate to generate an infinite stream of primes."
In FriCAS?, the function generate
has been renamed to stream
.
primes := stream(nextPrime,2)
(1) |
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 := stream(nextPrime,2)$Stream Integer
(2) |
or
primes := construct stream(nextPrime,2)
(3) |