so i have a problem in Prolog saying that i have to remove from a list all repetitive elements. ex: L=[1,2,1,4,1,3,4]
=> R=[2,3]
. I am not allowed to use any built in predicates. I know how to make it to remove duplicates ( like L=[1,2,1,4,1,3,4]
=> R=[1,2,3]
), but i need only the elements that appear only once in the list.
1
votes
Can you show what you've tried so far?
– lurker
@lurker. Same question as: stackoverflow.com/q/33259691/4609915
– repeat
@repeat yes, I originally cited that one as a duplicate, except in this case the OP has specified not allowed to use any built-in predicates, whereas that linked question seems to allow them (and all the answers
– lurker