svn: r7982
This commit is contained in:
parent
75b2415a96
commit
cc4d5cfdc1
|
@ -1,8 +1,15 @@
|
|||
#cs(module error mzscheme
|
||||
(require (lib "etc.ss") (lib "list.ss"))
|
||||
#lang mzscheme
|
||||
|
||||
(require (lib "etc.ss")
|
||||
(lib "list.ss"))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
(provide check-arg check-arity check-proc check-result check-list-list find-non
|
||||
tp-exn? number->ord)
|
||||
(provide check-arg check-arity check-proc check-result check-list-list
|
||||
natural?
|
||||
find-non tp-exn? number->ord)
|
||||
|
||||
(define (natural? w)
|
||||
(and (number? w) (integer? w) (>= w 0)))
|
||||
|
||||
;; (_ -> Boolean) (listof X) -> (union X false)
|
||||
(define (find-non pred? l)
|
||||
|
@ -71,4 +78,4 @@
|
|||
(format "1 argument")
|
||||
(format "~s arguments" arity-of-f))]
|
||||
[(arity-at-least? arity-of-f) (format "at least ~s arguments" (arity-at-least-value arity-of-f))]
|
||||
[else (format "multiple arities (~s)" arity-of-f)]))))))
|
||||
[else (format "multiple arities (~s)" arity-of-f)])))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user