Coming from a Haskell background, I really miss non-strict semantics in Java, 
and it seems that functor's support for them is fairly limited (I do note that 
it exists).  It'd be fairly easy to implement them either over existing functor 
interfaces or as a separate package.

Also, it seems that there could be expanded support for built-in functions 
(scans, filters, maps, grouping, etc.) .  I think these could be implemented 
naturally making use of just the standard Java Iterable<> interface


For example, I've implemented a fairly simple infrastructure that allows you to 
write code like:


        Iterable<BigInteger> allTheFactorials = scanl(
                BigInteger.ONE,
                BigInt.multiply,
                unfold(BigInt.N())
            );
        List<BigInteger> first30 = strict(take(30, allTheFactorials), new 
LinkedList<BigInteger>());
        System.out.println(join(first10, "\n"));

 And am wondering if this sort of thing might be a useful addition to the 
library.

Joe H.




Reply via email to