Go to the first, previous, next, last section, table of contents.
- assoc(a,b)
-
:: 連想リストをつくる
- return
-
List
- a
-
List
- b
-
List
- リスト a, b より
[[a[0],b[0]], [a[1],b[1]], ...]
なる新しいリストを生成する.
下の例では A
に動物の名前が,
B
に足の本数が入っている.
assoc(A,B)
で動物と足の本数をペアにしたリストを生成する.
[1192] A=["dog","cat","snake"];
[dog,cat,snake]
[1193] B=[4,4,0];
[4,4,0]
[1194] assoc(A,B);
[[dog,4],[cat,4],[snake,0]]
- 参照
-
@xref{cons}, @xref{append}
ChangeLog
-
この関数は 2004-6-28 に書かれた.
変更をうけたソースコードは
builtin/list.c 1.9
parse/eval.c 1.35,
parse/parse.h 1.31,
parse/quote.c 1.14--1.16.
Go to the first, previous, next, last section, table of contents.