skip to main content
article

Lazy functional programming in Java

Published:01 March 2006Publication History
Skip Abstract Section

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.

References

  1. Bird, R. & Wadler, P. (1988), Introduction to Functional Programming, Prentice Hall. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Clocksin, W. F. & Mellish, C. S. (1984), Programming in Prolog, 2nd edition, Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. Reade, C. (1989), Elements of Functional Programming, Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Sun Microsystems (2005), Java Technology home page: http://java.sun.com/Google ScholarGoogle Scholar

Index Terms

  1. Lazy functional programming in Java

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 41, Issue 3
      March 2006
      44 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1140543
      Issue’s Table of Contents

      Copyright © 2006 Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 March 2006

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!