(not (tag-extra tag)))))
\f
(define (make-tag predicate name #!optional extra description)
- (guarantee-procedure-of-arity predicate 1 'make-tag)
+ (guarantee unary-procedure? predicate 'make-tag)
(guarantee tag-name? name 'make-tag)
(if (predicate? predicate)
(error "Predicate is already registered:" predicate))
;; MIT/GNU Scheme: procedures
(register-predicate! apply-hook? 'apply-hook '<= procedure?)
+ (register-predicate! binary-procedure? 'binary-procedure '<= procedure?)
(register-predicate! compiled-procedure? 'compiled-procedure '<= procedure?)
(register-predicate! entity? 'entity '<= procedure?)
(register-predicate! generic-procedure? 'generic-procedure '<= procedure?)
(register-predicate! primitive-procedure? 'primitive-procedure
'<= procedure?)
(register-predicate! thunk? 'thunk '<= procedure?)
+ (register-predicate! unary-procedure? 'unary-procedure '<= procedure?)
(register-predicate! unparser-method? 'unparser-method '<= procedure?)
;; MIT/GNU Scheme: URIs
apply-hook-procedure
apply-hook?
arity-dispatched-procedure?
+ binary-procedure?
compiled-closure->entry
compiled-closure/ref
compiled-closure/set!
set-apply-hook-procedure!
set-entity-extra!
set-entity-procedure!
- thunk?)
+ thunk?
+ unary-procedure?)
(export (runtime continuation-parser)
compiled-procedure-frame-size))
(define-guarantee thunk "thunk")
+(define (unary-procedure? object)
+ (and (procedure? object)
+ (procedure-arity-valid? object 1)))
+
+(define (binary-procedure? object)
+ (and (procedure? object)
+ (procedure-arity-valid? object 2)))
+
(define-integrable (procedure-of-arity? object arity)
(and (procedure? object)
(procedure-arity-valid? object arity)))