Generalized parallel largest subsequence function in Haskell