Abstract
In this paper, we show how lazy functional programming techniques can be used within the Java programming language. We provide Java implementations of classic examples of lazy lists, such as the Sieve of Eratosthenes, the Eight Queens Problem, and natural-language parsing. We discuss how well these implementations succeed, compared to their original counterparts. We also point out the potential synergy between adding lazy techniques to Java, and adding generic types. The examples we provide would be suitable for teaching functional programming concepts in the context of a Java-based syllabus.
- Bird, R. & Wadler, P. (1988), Introduction to Functional Programming, Prentice Hall. Google Scholar
Digital Library
- Clocksin, W. F. & Mellish, C. S. (1984), Programming in Prolog, 2nd edition, Springer-Verlag. Google Scholar
Digital Library
- Java Community Process (2005), Java Specification Request 14: add generic types to the Java#8482; Programming Language: http://jcp.org/en/jsr/detail?id=014Google Scholar
- Reade, C. (1989), Elements of Functional Programming, Addison-Wesley. Google Scholar
Digital Library
- Sun Microsystems (2005), Java Technology home page: http://java.sun.com/Google Scholar
Index Terms
Lazy functional programming in Java
Recommendations
Evaluating the Java Native Interface JNI: Leveraging Existing Native Code, Libraries and Threads to a Running Java Virtual Machine
This article aims to explore JNI features and to discover fundamental operations of the Java programming language, such as arrays, objects, classes, threads and exception handling, and to illustrate these by using various algorithms and code samples. ...
Building Java program analysis tools using Javana
OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applicationsJavana is a tool for creating customized Java program analysis tools. It comes with an easy-to-use instrumentation framework that enables programmers to develop profiling tools that crosscut the Java application, the Java Virtual Machine (JVM) and the ...






Comments