1 2 3 4 5 6 7 8module MaxSequence where import Data.List -- Return the greatest subarray sum within the array of integers passed in. maxSequence :: [Int] -> Int maxSequence = maximum . map sum . concat . map inits . tails
1 2 3 4 5 6 7 8
module MaxSequence where import Data.List -- Return the greatest subarray sum within the array of integers passed in. maxSequence :: [Int] -> Int maxSequence = maximum . map sum . concat . map inits . tails