Hello there, prolog newbie here!
Simple question, probably with a simple answer:
How do I use an operation on every element of a list?
Lets say I have a predicate adding 4 to the given variable:
plusFour(X,Y) :- Y is X+4.
And now I want to use that on the list [1,2,3], so that it outputs [4,5,6].
How exactly would I do that?
Thanks in advance!