Java 8: Haskell Prelude List Functions

Sven Eric Panitz

An exercise in Java 8: Haskell Prelude List Functions

On this page you find some Java classes, which use the Java features of the project Lambda JSR 335 (Lambda Expressions for the JavaTM Programming Language).

The classes give an (almost) complete implementation of the Haskell prelude list functions in terms of Java 8. The Haskell functions are written as static methods in the class

Objects, which implement Iterable are treated as lazy Haskell lists. Thus expressions like take(10,(repeat("hello"))) will terminate.

Additionally you can find a very basic and simple parser combinator library here.

The classes are written solely as an exercise. Do not expect stable and thoroughly tested code here.