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

Arity

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

For example:

  (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