Chained binary functions with two outputs