diff options
author | dos-reis <gdr@axiomatics.org> | 2013-05-23 16:21:19 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-05-23 16:21:19 +0000 |
commit | 5aada956502dfd26bfc9d3eaa5dd3cddeaec59a2 (patch) | |
tree | e87bf0ec69d9f461466a01180ea694c60a420cb1 | |
parent | 97672104acdafd84c791fb00651b264e8c1345f7 (diff) | |
download | open-axiom-5aada956502dfd26bfc9d3eaa5dd3cddeaec59a2.tar.gz |
* algebra/stream.spad.pamphlet (LazyStreamAggregate) [entries]:
Define unconditionally, even it it does not make much sense in general.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/algebra/stream.spad.pamphlet | 24 |
2 files changed, 17 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3c2b39a1..f532239a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * algebra/stream.spad.pamphlet (LazyStreamAggregate) [entries]: + Define unconditionally, even it it does not make much sense in general. + 2013-05-22 Gabriel Dos Reis <gdr@integrable-solutions.net> * interp/sys-utility.boot (%Libstream): New. 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 |