Skip to content

Commit

Permalink
[common] Lists and arrays numify to number of elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 18, 2010
1 parent c05a516 commit ea3a9cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/NQP/NQPSetting.pm
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit ea3a9cb

Please sign in to comment.