2つのリストを3番目のリストに結合する。...
移動
次へ 前へ
上へ 最上
参考
append/3
member/2
reverse/2/3
sort/2
merge_sort/2
イフコンピュータ > MINERVA > マニュアル > レファレンス > 述語 > リスト > append/3

append/3

2つのリストを3番目のリストに結合する。

append(?第1リスト, ?第2リスト, ?第3リスト)

append/3 は、バックトラックで、第1リストと第2リストの結合が第3リストになるような、リストすべてを検索する。

引数

第1リスト              リスト
第2リスト              リスト
第3リスト              リスト

append(X,Y,Z). X <- [], Y <- _1, Z <- _1 の代入で、成功。
append([l,i],[s,t],X). X <- [l,i,s,t] の代入で、成功。
append(X,Y,[a,b]). 以下の代入で、3度成功。
X <- [], Y <- [a,b],
X <- [a], Y <- [b],
X <- [a,b], Y <- [].
append([a,b],X,Y). X <- _345, Y <- [a,b|_345] の代入で、成功。
append([a,b],f(y),Z). Z <- [a,b|f(y)] の代入で、成功。

標準

この述語は、ISO-Prolog 標準には含まれない。

関連

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

続く..
MINERVA
ifcomputer logo
f
Expert Services on the Web
言語
English
Japanese
サーバー
USA
Japan
サイトマップ
索引
目次
全体目次
全体索引
印刷向き
imode
PDA
探索
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/lists/append/home_jp.html
published 2008/9/8 update 2001/2/7 (c) 1996-2006 IF Computer Japan
IF Computer 〒113-0022 Tel 03-5814-3352 start (AT) ifcomputer.com
Customer Support 東京都文京区千駄木5-28-2   http://www.ifcomputer.co.jp
冒頭へ managed with ubiCMS