Design patterns for lazy evaluation
Proceedings of the thirty-first SIGCSE technical symposium on Computer science education
Structure and Interpretation of Computer Programs
Structure and Interpretation of Computer Programs
A Fixed Point Method for Power Series Computation
ISAAC '88 Proceedings of the International Symposium ISSAC'88 on Symbolic and Algebraic Computation
Infinite structures in SCRATCHPAD II
EUROCAL '87 Proceedings of the European Conference on Computer Algebra
Hi-index | 0.00 |
Programming languages which support lazy evaluation allow the definition of infinite streams as for example the stream of natural numbers or of prime numbers. Such streams are infinite in the sense that arbitrary many elements can be accessed as these elements are computed "on demand".This paper describes how infinite streams can be implemented in Java, a language which does not support lazy evaluation directly. Two possible implementations are described and compared. Furthermore it is shown how streams can be defined as fixed points of maps on infinite streams and how formal power series can be defined using infinite streams. As user interface to work with such streams Groovy is used.