このディレクトリの索引
#  http://toro.2ch.net/test/read.cgi/tech/1364009659/344
#  
#  uniq :: Eq a => [a] -> [a] 
#  uniq [] = [] 
#  uniq [x] = [x] 
#  uniq (x1:xs@(x2:_)) 
#  | x1 == x2 = uniq xs 
#  | otherwise = x1 : uniq xs 
#  

'uniq :: Eq a => [a] -> [a]
uniq [] = []
uniq [x] = [x]
uniq (x1:xs@(x2:_))
| x1 == x2 = uniq xs
| otherwise = x1 : uniq xs'(L1,L2) :-
        uniq(L1,L2).


uniq(L1,L2) :-
        findall(E,(
                    append(_,[E|R],L1),
                    \+(member(E,R))),
                L2).