svn: r15697
This commit is contained in:
parent
2414f4f880
commit
5604144718
|
@ -47,6 +47,24 @@
|
||||||
[(2) (format "~and" i)]
|
[(2) (format "~and" i)]
|
||||||
[(3) (format "~ard" i)])))
|
[(3) (format "~ard" i)])))
|
||||||
|
|
||||||
|
;; spell-out : number-or-string -> string
|
||||||
|
(define (spell-out arg-posn)
|
||||||
|
(cond
|
||||||
|
[(string? arg-posn) arg-posn]
|
||||||
|
[(number? arg-posn)
|
||||||
|
(case arg-posn
|
||||||
|
[(1) "first"]
|
||||||
|
[(2) "second"]
|
||||||
|
[(3) "third"]
|
||||||
|
[(4) "fourth"]
|
||||||
|
[(5) "fifth"]
|
||||||
|
[(6) "sixth"]
|
||||||
|
[(7) "seventh"]
|
||||||
|
[(8) "eighth"]
|
||||||
|
[(9) "ninth"]
|
||||||
|
[(10) "tenth"]
|
||||||
|
[else (number->ord arg-posn)])]))
|
||||||
|
|
||||||
;; Symbol (union true String) String X -> void
|
;; Symbol (union true String) String X -> void
|
||||||
(define (check-list-list pname condition pred given)
|
(define (check-list-list pname condition pred given)
|
||||||
(when (string? condition)
|
(when (string? condition)
|
||||||
|
@ -94,23 +112,6 @@
|
||||||
(spell-out arg-posn)
|
(spell-out arg-posn)
|
||||||
given)))
|
given)))
|
||||||
|
|
||||||
(define (spell-out arg-posn)
|
|
||||||
(cond
|
|
||||||
[(string? arg-posn) arg-posn]
|
|
||||||
[(number? arg-posn)
|
|
||||||
(case arg-posn
|
|
||||||
[(1) "first"]
|
|
||||||
[(2) "second"]
|
|
||||||
[(3) "third"]
|
|
||||||
[(4) "fourth"]
|
|
||||||
[(5) "fifth"]
|
|
||||||
[(6) "sixth"]
|
|
||||||
[(7) "seventh"]
|
|
||||||
[(8) "eighth"]
|
|
||||||
[(9) "ninth"]
|
|
||||||
[(10) "tenth"]
|
|
||||||
[else (format "~ath") arg-posn])]))
|
|
||||||
|
|
||||||
;; check-arity : sym num (list-of TST) -> void
|
;; check-arity : sym num (list-of TST) -> void
|
||||||
(define (check-arity name arg# args)
|
(define (check-arity name arg# args)
|
||||||
(if (= (length args) arg#)
|
(if (= (length args) arg#)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user