Skip to content
Permalink
Browse files

Correct count-only in 1dim shaped arrays

  • Loading branch information...
lizmat committed Sep 9, 2018
1 parent b1c645e commit bd83206192188815e4943a61eb987b812117d72d
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/Shaped1Array.pm6
@@ -208,7 +208,14 @@
($!pos = $i) # mark as done
)
}
method count-only() { nqp::elems($!reified) - $!pos - 1 }
method count-only(--> Int:D) {
nqp::p6box_i(
nqp::elems($!reified)
- $!pos
- nqp::islt_i($!pos,nqp::elems($!reified)
)
)
}
method sink-all(--> IterationEnd) {
$!pos = nqp::elems($!reified)
}

0 comments on commit bd83206

Please sign in to comment.
You can’t perform that action at this time.