Reading TIL: Partial application and currying aren't the same made me look at the implementation of
A helper function it uses:
; arity-mask? -> (or/c exact-nonnegative-integer? +inf.0 #f) ; ; Calculates the maximum number of arguments a function with the given arity may be applied to. If ; an unbounded number of arguments are permitted, returns +inf.0. If no number of arguments is valid ; (that is, the procedure is uninvokable), returns #f. (define (arity-upper-bound mask) (cond [(eqv? mask 0) #f] [(negative? mask) +inf.0] [else (sub1 (integer-length mask))]))
On first read, I nodded along. A minute later... wait. What exactly is an "uninvokable procedure", for which no number of arguments is valid (not even zero)?
It sounds like a procedure that can't be invoked/called/applied -- that doing so is an error.
Is that correct? If so, how do you create such a procedure, and why would you?