SWI-Prolog/swipl-devel — pull request #19 by triska (2014-10-19 10:07:27+00:00)
Title: ENHANCED: group_pairs_by_key/2 now also works for variable keys.

Please consider this patch for inclusion in master. There is nothing else in library(pairs) or keysort/2 that prevents the use of variables as keys, so group_pairs_by_keys/2 should support it too. A use case for this is to group and sum up coefficients of the same variable in linear constraints. Thank you!