Skip to content

Commit

Permalink
List.head should not decontainerize
Browse files Browse the repository at this point in the history
Fixed ValueMap from the latest Blin run
  • Loading branch information
lizmat committed Feb 13, 2023
1 parent b010e70 commit 615b9bf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/core.c/List.pm6
Expand Up @@ -480,14 +480,12 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
}

multi method head(List:D:) is raw {
nqp::decont(
nqp::isconcrete($!reified)
?? nqp::ifnull(
nqp::atpos($!reified,0),
self!AT_POS_SLOW(0)
)
!! self!AT_POS_SLOW(0)
)
nqp::isconcrete($!reified)
?? nqp::ifnull(
nqp::atpos($!reified,0),
self!AT_POS_SLOW(0)
)
!! self!AT_POS_SLOW(0)
}

multi method AT-POS(List:D: uint $pos) is raw {
Expand Down

0 comments on commit 615b9bf

Please sign in to comment.