use strict;
use warnings;
-use Test::More tests => 30;
+use Test::More;
use Test::Exception;
sub U {
sub head { (shift)->_list->[0] }
sub tail {
my $self = shift;
- $self->new(
+ (ref $self)->new(
'::' => [
@{$self->_list}[1 .. $#{$self->_list}]
]
my $redo = shift;
sub {
my ($list, $func, $acc) = @_;
- return $list->new('::' => $acc)
+ return (ref $list)->new('::' => $acc)
if $list->is_empty;
$redo->(
$list->tail,
is($coll2->print, '1, 4, 9, 16, 25, 36, 49, 64, 81, 100', '... new collection is changed');
}
-
-
-
-
-
-
-
+done_testing;