Skip to content

Commit

Permalink
Fix &list(Seq:D) to produce a List
Browse files Browse the repository at this point in the history
Per #1344 , a Seq is not
a "list", because it does not do a Positional role.
  • Loading branch information
zoffixznet committed Dec 31, 2017
1 parent e543c89 commit 1d772dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/List.pm
Expand Up @@ -1535,7 +1535,8 @@ sub permutations(Int() $n) {
Seq.new(Rakudo::Iterator.Permutations($n,0))
}

sub list(+l) { l }
multi list(+l) { l }
multi list(Seq:D \seq) { seq.list }

# Use **@list and then .flat it, otherwise we'll end up remembering all the
# things we flatten, which would be different semantics to .flat which gives
Expand Down

0 comments on commit 1d772dc

Please sign in to comment.