List prefix

Description

Checking if one list is begining of second

Source: PROLOG str. 51 Wydawnictwo PLJ Warszawa 1991 ISBN 83-85190-63-5

Download

Program source code: list_prefix.pl

Listing

prefiks([], _).
prefiks([X|L1], [X|L2]) :- prefiks(L1, L2).
 
test :- prefiks([d, f, w, k], [d, f, w, k, r, u, v, z]).

Comments

pl/prolog/pllib/list_prefix.txt · ostatnio zmienione: 2017/07/17 08:08 (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