diff --git a/src/builtins/any-list.pir b/src/builtins/any-list.pir index cd78d877969..082fb0a8371 100644 --- a/src/builtins/any-list.pir +++ b/src/builtins/any-list.pir @@ -18,12 +18,6 @@ the size of that file down and to emphasize their generic, =cut -.namespace ['Any'] -.sub 'onload' :anon :init :load - $P0 = get_hll_namespace ['Any'] - '!EXPORT'('end', 'from'=>$P0) -.end - =item elems() =cut @@ -42,18 +36,6 @@ the size of that file down and to emphasize their generic, .return ($I0) .end -=item end - -=cut - -.namespace ['Any'] -.sub 'end' :method :multi(_) - .local pmc list - list = self.'list'() - $I0 = list.'elems'() - dec $I0 - .return ($I0) -.end =item keys() diff --git a/src/setting/Any-list.pm b/src/setting/Any-list.pm index 1715ebdc2a4..8d697af127d 100644 --- a/src/setting/Any-list.pm +++ b/src/setting/Any-list.pm @@ -1,4 +1,6 @@ class Any is also { + multi method end() is export { $.list.elems - 1; } + multi method first(Code $test) { return $_ if $test($_) for @.list;