-
Notifications
You must be signed in to change notification settings - Fork 2
/
selector.scm
50 lines (44 loc) · 2.06 KB
/
selector.scm
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(require 'schelog)
(require 'database)
(module selector (%amount %value %ok-profile %bankyield %requested-credit)
(import database schelog chicken scheme )
(define %amount
(%rel (a b c d e f g h i k l m n p q val)
[('local_currency_deposits a val)
(%userdb a (cons 'local_currency_deposits val) c d e f g h i k l m n p q)]
[('foreign_currency_deposits a val)
(%userdb a b (cons 'foreign_currency_deposits val) d e f g h i k l m n p q)]
[('bank_guarantees a val)
(%userdb a b c (cons 'bank_guarantees val) e f g h i k l m n p q)]
[('negotiate_instruments a val)
(%userdb a b c d (cons 'negotiate_instruments val) f g h i k l m n p q)]
[('stocks a val)
(%userdb a b c d e (cons 'stocks val) g h i k l m n p q)]
[('mortgage a val)
(%userdb a b c d e f (cons 'mortgage val) h i k l m n p q)]
[('documents a val)
(%userdb a b c d e f g (cons 'documents val) i k l m n p q)]))
(define %value
(%rel (a b c d e f g h i k l m n p q val)
[('net_worth_per_assets a val)
(%userdb a b c d e f g h i k l (cons 'net_worth_per_assets val) n p q)]
[('last_year_sales_growth a val)
(%userdb a b c d e f g h i k l m (cons 'last_year_sales_growth val) p q)]
[('gross_profits_on_sales a val)
(%userdb a b c d e f g h i k l m n (cons 'gross_profits_on_sales val) q)]
[('short_term_debt_per_annual_sales a val)
(%userdb a b c d e f g h i k l m n p (cons 'short_term_debt_per_annual_sales val))
]))
(define %ok-profile
(%rel (a b c d e f g h i k prof m n p q)
[(a prof)
(%userdb a b c d e f g h i k (cons 'ok-profile prof) m n p q)]))
(define %bankyield
(%rel (yield= a b c d e f g h i k l m n p q)
[(a yield=)
(%userdb a b c d e f g h (cons 'bank-yield yield=) k l m n p q)]))
(define %requested-credit
(%rel (credit= a b c d e f g h i k l m n p q)
[(a credit=)
(%userdb a b c d e f g h i (cons 'requested-credit credit=) l m n p q)]))
)