Prolog search for possible combination for subtracting 2 elements from a list
问题 This is an extended problem from this page. Prolog possible removal of elements in a list For example, for a list X = [1,2,3], I can subtract like following: subtract 1 from 1st / 2nd element, and X becomes [1-1, 2-1, 3] = [0, 1, 3] = [1, 3] subtract 1 from 1st / 3rd element: X becomes [2, 2] subtract 1 from 2nd / 3rd element: X becomes [1, 1, 2] subtract 2 from 2nd / 3rd element: X becomes[1, 1] So, it is always subtracting 2 elements, and with the same number, but always a real number. Have