From 5aada956502dfd26bfc9d3eaa5dd3cddeaec59a2 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 23 May 2013 16:21:19 +0000 Subject: * algebra/stream.spad.pamphlet (LazyStreamAggregate) [entries]: Define unconditionally, even it it does not make much sense in general. --- src/algebra/stream.spad.pamphlet | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/algebra/stream.spad.pamphlet') 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 -- cgit v1.2.3