[previous] [up] [next]     [index]
Next: Primitives Up: Procedures Previous: Procedures

Arity

MzScheme's arity procedure inspects the input arity of a procedure:

Examples:

  (arity cons) ; => 2 
  (arity list) ; => #<struct:arity-at-least> 
  (arity-at-least? (arity list)) ; => #t 
  (arity-at-least-value (arity list)) ; => 0 
  (arity-at-least-value (arity (lambda (x . y) x))) ; => 1 
  (arity (case-lambda [(x) 0] [(x y) 1])) ; => (1 2) 
  (procedure-arity-includes? cons 2) ; => #t 
  (procedure-arity-includes? display 3) ; => #f 


PLT