Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p([],[]).
- p([H|Rest],Out):- p(H,Rest,Out) .
- p(f(A),Rest,[A|Rec]) :- p(Rest,Rec).
- p(p(A),Rest,[A|Rec]) :- p(Rest,Rec).
- ?- p([f(1),g(2)],L).
- L = [1, 2]
- true.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement