,each({ 'a', 'b', 'c'}, $item), prtn($item), next;実行例1
D:\sample\lib>adp each1.p a b c
,each({ 1, 2, 3, 4}, { 'A', 'B', 'C'}, $item1, $item2) ,prtn($item1,':',$item2) ,next;実行例2
D:\sample\lib>adp each2.p 1:A 2:B 3:C 4:NIL
{ "key1" => "value1", "key2" => "value2" }
[ ["key1" | "value1"], ["key2" | "value2"] ]
,$a = { 'a', 'b', 'c', 'd' }, $r == $a.mkmap({ 'A', 'B', 'C', 'D' }), prtn($r); ,$a = { 'a', 'b', 'c', 'd' }, $r == $a.mkmap({ 'B', 'C', 'D' }), prtn($r); ,$a = { 'a', 'b', 'c' }, $r == $a.mkmap({ 'A', 'B', 'C', 'D' }), prtn($r);
D:\sample\lib>adp mkmap.p {A => a, B => b, C => c, D => d} {B => a, C => b, D => c} RuntimeError:argment type error (1) At mkmap($a,{"A","B","C","D"},$r)
,$a == { 'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4} ,$k == { 'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd' } ,prtn($a) ,$r == remap($a, $k) ,prtn($r);
D:\sample\lib>adp remap.p {A => 1, B => 2, C => 3, D => 4} {a => 1, b => 2, c => 3, d => 4}
,$l = [a], $l.size.prtn; ,$a = { 1, 2, 3}, $a.size.prtn;
D:\sample\lib>adp size.p 1 3
,$x = { 'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4 }, slmap($x, { 'B', 'D'}).prt;
D:\sample\lib>adp slmap.p {B => 2, D => 4}