I have a trouble finding a solution to the following problem in Prolog.
Say we have a list with N+1 members (i.e. [X1, X2, X3, ..., XN, X(N+1)]). We want to write a p