aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/stream.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-05-23 16:21:19 +0000
committerdos-reis <gdr@axiomatics.org>2013-05-23 16:21:19 +0000
commit5aada956502dfd26bfc9d3eaa5dd3cddeaec59a2 (patch)
treee87bf0ec69d9f461466a01180ea694c60a420cb1 /src/algebra/stream.spad.pamphlet
parent97672104acdafd84c791fb00651b264e8c1345f7 (diff)
downloadopen-axiom-5aada956502dfd26bfc9d3eaa5dd3cddeaec59a2.tar.gz
* algebra/stream.spad.pamphlet (LazyStreamAggregate) [entries]:
Define unconditionally, even it it does not make much sense in general.
Diffstat (limited to 'src/algebra/stream.spad.pamphlet')
-rw-r--r--src/algebra/stream.spad.pamphlet24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/algebra/stream.spad.pamphlet b/src/algebra/stream.spad.pamphlet
index 4dd872f2..d0c4cb16 100644
--- a/src/algebra/stream.spad.pamphlet
+++ b/src/algebra/stream.spad.pamphlet
@@ -195,18 +195,18 @@ LazyStreamAggregate(S:Type): Category == StreamAggregate(S) with
-- if odd? i then x := rst x
-- eq?(x,y) => return false
- entries x ==
- -- returns a list of elements which have been computed
- -- error if infinite
- y := x
- l : L S := empty()
- for i in 0.. repeat
- explicitlyEmpty? y => return reverse! l
- lazy? y => error "infinite stream"
- l := concat(frst y,l)
- y := rst y
- if odd? i then x := rst x
- eq?(x,y) => error "infinite stream"
+ entries x ==
+ -- returns a list of elements which have been computed
+ -- error if infinite
+ y := x
+ l : L S := empty()
+ for i in 0.. repeat
+ explicitlyEmpty? y => return reverse! l
+ lazy? y => error "infinite stream"
+ l := concat(frst y,l)
+ y := rst y
+ if odd? i then x := rst x
+ eq?(x,y) => error "infinite stream"
--% CNAGG functions