Skip to content
Browse files

[common] Lists and arrays numify to number of elements.

  • Loading branch information...
1 parent c05a516 commit ea3a9cb55b12143a596debf848f380fd7b85de6c @jnthn committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 common/NQP/NQPSetting.pm
View
6 common/NQP/NQPSetting.pm
@@ -72,6 +72,9 @@ knowhow NQPList is repr('P6list') {
method elems() {
nqp::lllist_elems(self)
}
+ method Numeric() {
+ self.elems
+ }
method at_pos($idx) {
nqp::lllist_get_at_pos(self, $idx.Int)
}
@@ -81,6 +84,9 @@ knowhow NQPArray is repr('P6list') {
method new() {
nqp::instance_of(self.WHAT)
}
+ method Numeric() {
+ self.elems
+ }
method elems() {
nqp::lllist_elems(self)
}

0 comments on commit ea3a9cb

Please sign in to comment.
Something went wrong with that request. Please try again.