aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/stream.spad.pamphlet
diff options
context:
space:
mode:
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