"The last element of List1" reads like it is talking about the last element in the list position-wise. "This implementation is deterministic if Elem occurs exactly once in List1." is probably what is meant.
Did you know ... | Search Documentation: |
Predicate select/3 |
?- select(10,[1,2,3],R). false. ?- select(2,[1,2,3],R). R = [1, 3] ; false. ?- select(2,[1,2,3,2,4],R). R = [1, 3, 2, 4] ; R = [1, 2, 3, 4] ; false. ?- select(2,[1,2,3,2,4,2],R). R = [1, 3, 2, 4, 2] ; R = [1, 2, 3, 4, 2] ; R = [1, 2, 3, 2, 4].