from typing import Iterable
from typing import List


def maximum_subarray(iterable: Iterable[float]) -> List[float]:
    """Dynamically constructs coherent subarray with maximal sum.

    :param iterable: sequence of numbers
    :return: maximum subarray"""
    actual = [0, []]
    maximal = (0, [])

    for elem in iterable:
        if actual[0] < 0.0:
            actual = [0, []]

        actual[0] += elem
        actual[1].append(elem)

        if actual[0] > maximal[0]:
            maximal = (actual[0], actual[1][:])

    return maximal[1]