Różnice

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

Odnośnik do tego porównania

pl:prolog:pllib:meta_interpreter_5 [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Meta interpreter 5 ======
 +{{tag>​metainterpreter}}
 +===== Description =====
 +A meta-interpreter for determining a residue
 +
 +**Source**: ​ The Art of Prolog
 +===== Download =====
 +Program source code: {{meta_interpreter_5.pl}}
 +===== Listing =====
 +<code prolog>
 +/*
 +        preduce(Goal,​Residue) :-
 +           ​Partially reduce Goal to leave the residue Residue.
 +*/
 +        preduce(true,​true) :-  !.
 +        preduce((A,​B),​(PA,​PB)) :-  !, preduce(A,​PA),​ preduce(B,​PB).
 +        preduce(A,​B) :-  should_fold(A,​B),​ !.
 +        preduce(A,​Residue) :-
 +           ​should_unfold(A),​ !, clause(A,​B),​ preduce(B,​Residue).
 +        preduce(A,​A).
 +
 +%     ​Program 18.2: A meta-interpreter for determining a residue
 +</​code>​
 +===== Comments =====
  
pl/prolog/pllib/meta_interpreter_5.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