https://github.com/functionaljava/functionaljava/blob/6ac5f9547dbb1f0ca3777be6b366f256e9943194/core/src/main/java/fj/data/List.java#L452

This function was written over 15 years ago. I disagree with this reasoning that though a lot of programmers are unwilling to make the investment to learn (true), that this has consequences for the use of Haskell (not true). Those same programmers have barely learned Java and yet Java is pervasive through our industry. I learned this (nobody knows Java) when I was working on implementing the JVM and I asked myself, "if I am to implement this Java thing, does anyone out there actually know it?" I quickly learned that the answer is no. In fact, I wrote a test back then (~2003), subtitled, "but do you even know the basics of Java?" and the best score to this day on that test is 4/10 (twice). I wrote that test to debunk the common protest, "but where will I hire Java programmers?!" The correct answer is nowhere, they do not exist.

Sorry for the diversion.


On 07/12/2018 12:03 AM, Bryan Richter wrote:
cartProdN :: [[a]] -> [[a]] cartProdN = sequence

This also made me realize of two things:
0. Haskell will never be mainstream, because there are not a lot of programmers out there who are willing to do the investment required for learning the necessary concepts to understand and write code like the one shown above.