Finish getting all the problems.

This commit is contained in:
Dominik Pantůček 2023-03-27 17:51:56 +02:00
parent f6c77f57ef
commit 99a674f24e
2 changed files with 10 additions and 2 deletions

View file

@ -161,8 +161,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
((problems) ((problems)
(let loop ((mb MB)) (let loop ((mb MB))
(when (not (null? mb)) (when (not (null? mb))
(when (member-highlights? (car mb)) (when (not (member-valid? (car mb)))
(newline) (newline)
(print-member-table (car mb))
(print-member-source (car mb))) (print-member-source (car mb)))
(loop (cdr mb))))) (loop (cdr mb)))))
) )

View file

@ -44,6 +44,7 @@
member-record-info member-record-info
member-missing-keys member-missing-keys
member-highlights? member-highlights?
member-valid?
member-destroyed? member-destroyed?
member-suspended? member-suspended?
@ -72,7 +73,8 @@
testing testing
month month
period period
configuration) configuration
primes)
;; Checks whether given string is a 4-digit decimal number. ;; Checks whether given string is a 4-digit decimal number.
(define (is-4digit-string? s) (define (is-4digit-string? s)
@ -199,6 +201,11 @@
(define (member-highlights? mr) (define (member-highlights? mr)
(dict-has-key? mr 'highlights)) (dict-has-key? mr 'highlights))
;; True if member record is OK
(define (member-valid? mr)
(and (not (member-highlights? mr))
(is-4digit-prime? (member-id mr))))
;; Returns true if the member record represents destroyed member. The ;; Returns true if the member record represents destroyed member. The
;; *current-month* is a global parameter from period module. ;; *current-month* is a global parameter from period module.
(define (member-destroyed? mr) (define (member-destroyed? mr)