This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define fpmap | |
(lambda args | |
(map (lambda (iter) | |
(apply (first args) iter (remove-last (rest args)))) (last args)))) | |
(define (remove-last l) | |
(reverse (rest (reverse l)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _max(values, func=None): | |
if not func: | |
return max(values) | |
maybeMax = values[0] | |
for v in values: | |
if func(v, maybeMax): | |
maybeMax = v | |
return maybeMax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import sys | |
me = '' | |
them = '' | |
paid_to_me = 0 | |
paid_to_them = 0 | |
payment_from_them = 0 | |
payment_to_them = 0 |
OlderNewer