Created
March 17, 2016 06:09
-
-
Save metanest/e8c9546dde2f610f51d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parFlatten :: [[a]] -> [a] | |
parFlatten = parFlattenLoop [] | |
where | |
parFlattenLoop [] [] = [] | |
parFlattenLoop tmp [] = parFlattenLoop [] (reverse tmp) | |
parFlattenLoop tmp ([]:xss) = parFlattenLoop tmp xss | |
parFlattenLoop tmp ((x:xs):xss) = x : parFlattenLoop (xs:tmp) xss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment