P04 - 查找列表中的元素数量。
作者:Ryan Connelly
示例
> say get-num-elems(<a b c d e>); 5
源代码: P04-topo.pl
use v6; sub get-num-elems(@list) { @list.elems; } say get-num-elems(<a b c d e>);
作者:Ryan Connelly
> say get-num-elems(<a b c d e>); 5
源代码: P04-topo.pl
use v6; sub get-num-elems(@list) { @list.elems; } say get-num-elems(<a b c d e>);