PDF4PRO ⚡AMP

Modern search engine that looking for books and documents around the web

Example: biology

INTRODUÇÃO À LINGUAGEM PROLOG - IME-USP

INTRODU O LINGUAGEM PROLOG SILVIO LAGO% distribui(L,A,B) : distribui itens de L entre A e B distribui([],[],[]). distribui([X],[X],[]). distribui([X,Y|Z],[X|A],[Y|B]) :- distribui(Z,A,B). % intercala(A,B,L) : intercala A e B gerando L intercala([],B,B). intercala(A,[],A). intercala([X|A],[Y|B],[X|C]) :- X =< Y, intercala(A,[Y|B],C). intercala([X|A],[Y|B],[Y|C]) :- X > Y, A C B E F D Sum rio 1. Elementos B 03 Fatos .. 03 03 Vari veis 04 Vari veis An nimas .. 05 05 Grafos de 05 Exerc 2.

irmão(cain,abel). irmão(cain,seth). irmão(abel,cain). irmão(abel,seth). irmão(seth,cain). irmão(seth,abel). Entretanto, usar regras, além de muito mais elegante e conciso, também é muito mais consistente. Por exemplo, se o fato pai(adão,eloi) fosse acres-centado ao Programa 1.1, usando a definição por regra, nada mais precisaria ser ...

Tags:

  Naic, Able

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Spam in document Broken preview Other abuse

Transcription of INTRODUÇÃO À LINGUAGEM PROLOG - IME-USP

Related search queries