prototype append_sorted_unique mpl function