sort tests added
This commit is contained in:
10
debug.lsp
10
debug.lsp
@@ -34,9 +34,15 @@
|
||||
|
||||
(print (len csv_list))
|
||||
|
||||
(define my_tickers '("WFC" "AIG"))
|
||||
(define my_tickers '("FDX" "C" "AIG" "BAC" "BK" "PBF" "PBFX" "SYF" "WFC" "TEVA" "XOM"))
|
||||
|
||||
; (print (filter (lambda (x) (= (first x) "CLX")) csv_list))
|
||||
(print (filter (lambda (x) (member my_tickers (first x))) csv_list))
|
||||
; (print (filter (lambda (x) (member my_tickers (first x))) csv_list))
|
||||
(define csv_list (filter (lambda (x) (member my_tickers (first x))) csv_list))
|
||||
|
||||
|
||||
(define sorted_list (quick-sort-by csv_list (lambda (a b) (> (str-to-date (second a) "%m/%d/%Y") (str-to-date (second b) "%m/%d/%Y")))))
|
||||
|
||||
(for x csv_list (print x))
|
||||
|
||||
(print "Debug ends")
|
||||
|
||||
Reference in New Issue
Block a user