appends two lists to a third one....
Move to
Next Prev
Up Top
See also
append/3
member/2
reverse/2/3
sort/2
merge_sort/2
IF Computer > MINERVA > Manual > Reference > Predicates > Lists > append/3

append/3

appends two lists to a third one.

append(?FirstList, ?SecondList, ?ThirdList)

append/3 retrieves by backtracking all lists such that the concatenation of FirstList with SecondList results in ThirdList.

Arguments

FirstList              list
SecondList             list
ThirdList              list

Examples

append(X,Y,Z). Succeeds with substitution X <- [], Y <- _1, Z <- _1.
append([l,i],[s,t],X). Succeeds with substitution X <- [l,i,s,t].
append(X,Y,[a,b]). Succeeds three times with substitution
X <- [], Y <- [a,b],
X <- [a], Y <- [b],
X <- [a,b], Y <- [].
append([a,b],X,Y). Succeeds with substitution X <- _345, Y <- [a,b|_345].
append([a,b],f(y),Z). Succeeds with substitution Z <- [a,b|f(y)].

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

member/2, reverse/2/3, sort/2. merge_sort/2.

read on...
MINERVA
ifcomputer logo
f
Expert Services on the Web
Language
English
Japanese
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/lists/append/home_en.html
published 2008/6/30 update 2001/2/7 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 info@ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS