[[
✎ pl:prolog:pllib:term2list
]]
aiWiki
Pokaż stronę
Ostatnie zmiany
Indeks
Zaloguj
Ta strona jest tylko do odczytu. Możesz wyświetlić źródła tej strony ale nie możesz ich zmienić.
====== Term2list ====== {{tag>lists}} ===== Description ===== Constructing a list corresponding to a term. **Source**: The Art of Prolog ===== Download ===== Program source code: {{term2list.pl}} ===== Listing ===== <code prolog> /* univ(Term, List) :- List is a list containing the functor of Term followed by the arguments of Term. */ univ(Term, [F|Args]) :- functor(Term,F,N), args(0,N,Term,Args). args(I,N,Term,Arg,Args) :- I < N, I1 is I+1, arg(I1,Term,Arg), args(I1,N,Term,Args). args(N,N,Term,[]). % Program 9.5a Constructing a list corresponding to a term </code> ===== Comments =====
pl/prolog/pllib/term2list.txt
· ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
Pokaż stronę
Poprzednie wersje
Menadżer multimediów
Do góry