Advertisement
alexarcan

AIF Lab7

Apr 7th, 2016
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. %HW1
  2. %1
  3. :- op(600,xfx,was).
  4. :- op(500,xfy,of).
  5. :- op(400,fx,the).
  6. john was the secretary of the department.
  7.  
  8.  
  9. %2
  10. :-op(600,fx,deleting).
  11. :-op(500,xfx,from).
  12. :-op(400,xfx,gives).
  13.  
  14. deleting _ from [] gives Result:-
  15. Result=[].
  16.  
  17. deleting Elem from [Elem|Tail] gives Result:-
  18. Result=Tail.
  19.  
  20. deleting Elem from [Head|Tail] gives Result:-
  21. deleting Elem from Tail gives Tail1,
  22. Result = [Head|Tail1].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement