Write a Prolog program that reads an integer x and a list of integers L, then locates the list of all positions of x in L, and returns the resulting list.
For example, for x=2 and L=[1,2,3,4,2,5,2,6], the program should return the list R=[1,4,6].
Note: If your compiler counts the positions starting from one, the result will be R=[2,5,7].