Finish total debit milestone.
This commit is contained in:
parent
d9d37daf1d
commit
cf4652084f
5 changed files with 20 additions and 11 deletions
|
@ -133,8 +133,9 @@
|
|||
(map (lambda (mr) (dict-ref (dict-ref mr 'info) 'nick)) mb))
|
||||
|
||||
;; Returns dictionary with statistics about the members base.
|
||||
(define (members-base-info mb)
|
||||
(let* ((di0 (make-dict))
|
||||
(define (members-base-info mb-arg)
|
||||
(let* ((mb (filter-members-by-predicate mb-arg member-record-usable?))
|
||||
(di0 (make-dict))
|
||||
(di1 (dict-set di0 'invalid
|
||||
(filter-members-by-predicate mb
|
||||
(compose not is-4digit-prime? member-id))))
|
||||
|
@ -150,12 +151,15 @@
|
|||
(di7 (dict-set di6 'total mb)))
|
||||
di7))
|
||||
|
||||
(define (members-base-oldest-month mb)
|
||||
(make-month 2015 1))
|
||||
|
||||
;; Returns a list two lists: keys, data.
|
||||
;; Each data record contains values for all keys.
|
||||
(define (members-base-stats mb)
|
||||
(let ((keys '(month total active suspended students destroyed invalid)))
|
||||
(let mloop ((data '())
|
||||
(month (*member-default-joined*)))
|
||||
(month (members-base-oldest-month mb)))
|
||||
(if (month<? month (*current-month*))
|
||||
(let ((bi (parameterize ((*current-month* month))
|
||||
(members-base-info mb))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue