-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram-3.bak
More file actions
25 lines (21 loc) · 832 Bytes
/
Program-3.bak
File metadata and controls
25 lines (21 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#lang racket
(require "preprocessing.rkt")
(require "processing.rkt")
(require "output.rkt")
(provide main)
#| This is the start of the 'main' function, what is intended to
automatically execute when using the run function of the compiler|#
(define (main)
(define accounts-list (process-file "ACCOUNTS.TXT"))
(define transactions-list (process-file "TRANSACTIONS.TXT"))
(for-each (lambda (account-num)
(let-values (((total-payments total-purchases)
(process-account
transactions-list account-num)))
(printf
"Account: ~a\nTotal Payments: ~a\nTotal Purchases: ~a\n"
account-num
total-payments
total-purchases)))
(only-account-numbers accounts-list)))
(main)