private SizeFn repeatedPermutationSize(final ThreadContext context) {
final Ruby runtime = context.runtime;
final RubyArray self = this;
return new SizeFn() {
@Override
public IRubyObject size(IRubyObject[] args) {
RubyFixnum n = self.length();
assert args != null && args.length > 0 && args[0] instanceof RubyNumeric; // #repeated_permutation ensures arg[0] is numeric
long k = ((RubyNumeric) args[0]).getLongValue();