Ok, you should not reproduce code and use the trial and error technique, maybe maybe it will work

. You need to understand what happens.
Your 'value' predicate receives a list of digits and signs, either plus-es or minus-es. So your list will look something like this: [1, '+', 2, 3, '-', 4, '-', 5, 6, '+' 7]
The 'value' predicate should traverse this list and compute the expression 1 + 23 - 4 + 56 + 7. You can use most of the code that already exists in the 'value' predicate, for example whenever you have a sublist like [5, 6] that doesn't have any operators in it, only digits, the 'value' predicate will call 'decimal' to determine the value is 56. You already have that. What you don't have is a way to perform addition when a '+' sign is encountered and perform subtraction where a '-' sign is encountered.
First idea that comes to mind is to determine a '+' in the list above. You do that by calling append(L1, ['+' | L2], L) where L is the list above. If this append succeeds, L1 and L2 will be the sublists from the left and from the right of that '+'. Now you can call 'value' on L1, 'value' on L2, obtain an integer from each call and add them.
This only works for addition. For subtraction this idea works but
only if your '-' sign is the last sign in the list. This is because your minus sign is left associative
3 - 2 - 1 = (3 - 2) - 1 ... correct
3 - 2 - 1 = 3 - (2 - 1) ... incorrect
For the plus sign, this problem never appears.
So if you have L = [3, '-', 2, '-', 1], you need to locate the last '-' sign, then you would have L1 = [3, '-', 2] and L2 = [1]. Now you can safely evaluate L1 to a number and L2 to another number, subtract the numbers and have the correct value.
I'll give you a quick fix of the 'value' predicate. It's not the best solution but I think it's close to the one you already have, so I believe you will understand it easier. I'll write just 2 rules for your 'value' predicate, and you will have to write the third rule yourself
First rule:
Code:
value(L, X) :-
not(member('+', L)),
not(member('-', L)), !,
decimal(L, 0, X).
If your list contains no '+' and no '-', then we're happy, we can evaluate it easy using decimal.
Second rule:
Code:
value(L, X) :-
append(L1, ['+' | L2], L),
not(member('-', L2)),
not(member('+', L2)),
!,
value(L1, A),
decimal(L2, 0, B),
X is A + B.
We split the list in L1 and L2 such that a '+' sign exists in between, but we also make sure that L2 contains no '+' and no '-'. This is how we make sure the '+' sign between L1 and L2 is the last sign from the whole list. After we have L1 and L2, we evaluate L1 to A using 'value' because it may contain other operators, we evaluate L2 to B using 'decimal' because we made sure L2 contains no operators, and then we add A and B to obtain X, the value of the entire list.
You have to add one more 'value' rule that deals with the '-' sign.