Upon the winding up of a limited partnership, the assets shall be distributed as follows:
(1) To creditors, including partners who are creditors, to the extent permitted by law, in satisfaction of liabilities of the limited partnership other than liabilities for distributions to partners under § 10-601 or § 10-604 of this title;
(2) Unless otherwise provided in the partnership agreement, to partners and former partners in satisfaction of liabilities for distributions under § 10-601 or § 10-604 of this title; and
(3) Unless otherwise provided in the partnership agreement, to partners first for the return of their contributions and second respecting their partnership interests, in the proportions in which the partners share in distributions.