On Mon, 19 Jun 2017 09:30:41 -0700, brad wrote: > Or you could use `.elems` > > say (1..10).grep(-> $i { %sum{$i}.elems == 2 });
PS: note that, as a general usecase, you also need a `:v` there. Otherewise you're .elems'ing an Any, which follows the anything-is-a-1-item-list rule and you end up with .elems being 1 for keys without values: my %h; say %h<meows>.elems 1 my %h; say %h<meows>:v.elems 0