I am trying to do a simple tranformation to all elemnts of a list:
trans(X, M, Y):- Y is X*(-1) - M.
Then I am writing:
maplist(trans, [1,2,3], NEW). I am getting a just a true instead of a new list..
maplist(trans, [1,2,3], NEW).
true
Pass a value to parameter like this for example:
maplist(trans(5), [1,2,3], NEW)
Result: NEW = [-6, -7, -8]
Pass a value to parameter like this for example:
maplist(trans(5), [1,2,3], NEW)Result: NEW = [-6, -7, -8]