Download Combination-Algorithm-Writer-Multiple-Predicates/remove_duplicate_predicates.pl from luciangreen/phil_algs: direct link, hf CLI and curl.
- Browser
- Download file 271 Bytes
-
https://huggingface.co/datasets/luciangreen/phil_algs/resolve/main/Combination-Algorithm-Writer-Multiple-Predicates/remove_duplicate_predicates.pl
- Command line
-
hf download hf://datasets/luciangreen/phil_algs/Combination-Algorithm-Writer-Multiple-Predicates/remove_duplicate_predicates.pl
-
curl -L -o remove_duplicate_predicates.pl https://huggingface.co/datasets/luciangreen/phil_algs/resolve/main/Combination-Algorithm-Writer-Multiple-Predicates/remove_duplicate_predicates.pl
271 Bytes
| %% remove_duplicate_predicates | |
| %%remove_duplicate_predicates(Predicates1 | |
| %% Predicates1=[Predicate2|Predicates3], | |
| %% remvdup([a,a,a,b,b,c],[],A) | |
| %% A = [a, b, c]. | |
| remvdup([],A,A):-!. | |
| remvdup(A,B,C):- | |
| A=[A1|As], | |
| delete(As,A1,B2), | |
| append(B,[A1],D), | |
| remvdup(B2,D,C). | |