testMaxSubarray :: Bool
testMaxSubarray = and $ map (\ (xs, e) -> e == (maxSubarray xs)) testCases
    where testCases = [([-2, 1, -3, 4, -1, 2, 1, -5, 4], 6)] ++
                      [([2, 3, 7, -5, -1, 4, -10], 12)]
testMaxSubarray :: Bool
testMaxSubarray = and $ map (\ (xs, e) -> e == (maxSubarray xs)) testCases
    where testCases = [([-2, 1, -3, 4, -1, 2, 1, -5, 4], 6)] ++
                      [([2, 3, 7, -5, -1, 4, -10], 12)]
testMaxSubarray = and $ map (\ (xs, e) -> e == (maxSubarray xs)) testCases
    where testCases = [([-2, 1, -3, 4, -1, 2, 1, -5, 4], 6)] ++
                      [([2, 3, 7, -5, -1, 4, -10], 12)]