Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:prolog:pllib:food_chain [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Food chain ======
 +{{tag>​recursion}}
 +===== Description =====
 +Program use recursion to show food chain
 +
 +**Source**: ​ Learn prolog now!, 2001, (course available on-line)
 +===== Download =====
 +Program source code: {{food_chain.pl}}
 +===== Listing =====
 +<code prolog>
 +is_digesting(X,​Y) :- just_ate(X,​Y).
 +is_digesting(X,​Y) :-
 + just_ate(X,​Z),​
 + is_digesting(Z,​Y).
 +
 +just_ate(mosquito,​blood(john)).
 +just_ate(frog,​mosquito).
 +just_ate(stork,​frog).</​code>​
 +===== Comments =====
  
pl/prolog/pllib/food_chain.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0