News for hackers. Stuff that matters.
Re:Running a Startup on Haskell by Dn_Ab on Monday October 31, 2011 @11:16PM (#3180454)
The higher order monadic join concept cannot be implemented in java but a simpler function in terms of flattening a list of list is easy enough. In a functional language a simple way would be to fold over (++) append.

so in java a simple way would be to initialize an l = arrayList and then do a foreach on each list in the list of the lists and foreach element in each list add it to the arrayList l. Not as elegant, much more how instead of what but 4 noisy lines max.

C# has list.selectMany( _ => _ ) for that.

Re:Running a Startup on Haskell by eru on Tuesday November 01, 2011 @01:42AM (#3180789)
> In a functional language a simple way would be to fold over (++) append.

Though you probably wouldn't want to do use that approach for performance reasons.