code: func (c *Compiler) GetArity(ref Ref) int {
  	if bi := BuiltinMap[ref.String()]; bi != nil {
  		return len(bi.Decl.Args())
  	}
  	rules := c.GetRulesExact(ref)
  	if len(rules) == 0 {
  		return -1
  	}
  	return len(rules[0].Head.Args)
  }
docs: // GetArity returns the number of args a function referred to by ref takes. If
  // ref refers to built-in function, the built-in declaration is consulted,
  // otherwise, the ref is used to perform a ruleset lookup.