Switch table to kwargs proc define, add more day/month support procedures.

This commit is contained in:
Dominik Pantůček 2023-05-19 21:58:14 +02:00
parent c9ba551132
commit fac674f886
4 changed files with 25 additions and 13 deletions

View file

@ -50,6 +50,8 @@
cal-day/month<?
cal-day/month->string
cal-day-tests!
)
@ -205,6 +207,14 @@
"Requires two arguments of the same type"
(list a b)))))
;; Semi-universal string conversion
(define (cal-day/month->string v)
(if (cal-day? v)
(cal-day->string v)
(if (cal-month? v)
(cal-month->string v)
"")))
;; Module self-tests
(define (cal-day-tests!)
(run-tests