aboutsummaryrefslogtreecommitdiff
path: root/module/text/numbers/en.scm
blob: 4f33f87eb1a7b4878a8d644eafa0955dbb13eba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(define-module (text numbers en)
  :use-module (ice-9 format))

(define-public (number->string-cardinal n)
  (format #f "~r" n))

(define-public (number->string-ordinal n)
  (format #f "~:r" n))

;; Allows extra args to handle eventual local changes.
(define-public (each-string count . _)
  (cond count
        [(1) "each"]
        [(2) "every other"]
        [else (format #f "every ~:r" n)]))