Closed p6rt closed 15 years ago
src/builtins/any-list.pir | 61 --------------------------------------------- src/setting/Any-list.pm | 24 +++++++++++++++++ 2 files changed, 24 insertions(+), 61 deletions(-)
After some discussions on #perl6 I've created new version of Any.reduce.
pmichaud++ as usual :)
-- Bacek
src/builtins/any-list.pir | 61 --------------------------------------------- src/setting/Any-list.pm | 21 ++++++++++++++- 2 files changed, 20 insertions(+), 62 deletions(-)
Hello.
This one is latest vesion. Sorry for messing with git-send-email :-/
-- Bacek
@bacek - Status changed from 'new' to 'open'
On Tue, Mar 10, 2009 at 03:40:20AM -0700, Vasily Chekalkin wrote:
+ multi method reduce(Code $expression) { + my Int $arity = $expression.count; + die('Cannot reduce() using a unary or nullary function.') if $arity \< 2; + + my $list := @.list or fail('Cannot reduce() empty list');
Why is one condition 'die' and the other condition 'fail'?
+ my $res = $list.shift;
Note that $list might not be something that can be shifted -- 'shift' is only available for Arrays and Iterators.
So, patch rejected, at least this version of it.
Pm
On Sat Mar 07 16:14:01 2009, bacek wrote:
--- src/builtins/any-list.pir | 61 --------------------------------------------- src/setting/Any-list.pm | 24 +++++++++++++++++ 2 files changed, 24 insertions(+), 61 deletions(-)
After few iterations moritz++ implemented final version. Resolving ticket.
-- Bacek
@bacek - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#63698 (status was 'resolved')
Searchable as RT63698$