# [racket] on the arity of the composition of procedures with different arities

Looks like a bug in compose1 (and compose) to me.
Robby
On Tue, Aug 7, 2012 at 10:46 PM, Erik Dominikus
<erik.dominikus71 at gmail.com> wrote:
>* I had this conversation with DrRacket 5.2:
*>*
*>>* (procedure-arity (compose1 (lambda (x) 0) (lambda () 0)))
*>* (arity-at-least 0)
*>*
*>>* (procedure-arity (compose1 (lambda (x) 0) (lambda (x) 0)))
*>* 1
*>*
*>>* (procedure-arity (compose1 (lambda (x) x) (lambda (x y) 0)))
*>* (arity-at-least 0)
*>*
*>* I think the arity of the first procedure above should be exactly 0 since
*>* (arity-at-least 0) means that the procedure can take 0, 1, 2, 3
*>* arguments and so on, and indeed DrRacket says that it can't:
*>*
*>>* ((compose1 (lambda (x) 0) (lambda () 0)) 0)
*>* #<procedure>: expects no arguments, given 1: 0
*>*
*>* By the same way of thought, I think the arity of the third procedure
*>* should be exactly 2.
*>*
*>* Am I missing something?
*>*
*>* ____________________
*>* Racket Users list:
*>* http://lists.racket-lang.org/users
*