Remove procedure-fixed-arity?.

I don't really need this function.  I think I wrote it just to see how
I can count the arity of a procedure.
This commit is contained in:
Sergiu Ivanov 2022-02-13 20:09:50 +01:00
parent ec50395cb0
commit b36d8adaa4
2 changed files with 3 additions and 20 deletions

View File

@ -17,8 +17,8 @@
(contract-out
[tabulate (-> procedure? (listof generic-set?) (listof list?))]
[tabulate* (-> (listof procedure?) (listof generic-set?) (listof list?))]
[tabulate/boolean (-> procedure-fixed-arity? (listof (listof boolean?)))]
[tabulate*/boolean (-> (non-empty-listof procedure-fixed-arity?) (listof (listof boolean?)))]
[tabulate/boolean (-> procedure? (listof (listof boolean?)))]
[tabulate*/boolean (-> (non-empty-listof procedure?) (listof (listof boolean?)))]
[tabulate/01 (-> procedure? (listof (listof (or/c 0 1))))]
[tabulate*/01 (-> (non-empty-listof procedure?) (listof (listof (or/c 0 1))))]
[table->function (-> (listof (*list/c any/c any/c)) procedure?)]

View File

@ -470,8 +470,7 @@
(provide
;; Functions
(contract-out [procedure-fixed-arity? (-> procedure? boolean?)]
[in-random (case-> (-> (stream/c (and/c real? inexact? (>/c 0) (</c 1))))
(contract-out [in-random (case-> (-> (stream/c (and/c real? inexact? (>/c 0) (</c 1))))
(-> (integer-in 1 4294967087) (stream/c exact-nonnegative-integer?))
(-> exact-integer? (integer-in 1 4294967087)
(stream/c exact-nonnegative-integer?)))]
@ -500,22 +499,6 @@
(cons/c key-contract val-contract)))
;;; =========
;;; Functions
;;; =========
;;; Returns #t if the function has fixed arity (i.e. if it does not
;;; take a variable number of arguments).
(define (procedure-fixed-arity? func)
(match (procedure-arity func)
[(arity-at-least _) #f] [arity #t]))
(module+ test
(test-case "procedure-fixed-arity?"
(check-true (procedure-fixed-arity? not))
(check-false (procedure-fixed-arity? +))))
;;; ==========
;;; Randomness
;;; ==========