pick returns references to objects in array rather than copies of the objects #73

Closed
colomon opened this Issue Oct 21, 2011 · 0 comments

Projects

None yet

2 participants

@colomon
Collaborator
colomon commented Oct 21, 2011

niecza: my @a = 10, 9, 8, 7, 6, 5, 4, 3, 2, 1; sub test(@b) { say @b.perl; @a = @a.sort({ $^a <=> $^b }); say @b.perl }; test(@a.pick(5));
p6eval niecza v10-58-gc851cf8: OUTPUT«(9, 10, 4, 1, 7).list␤(3, 2, 3, 3, 5).list␤»

@sorear sorear closed this in dab6499 Oct 31, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment