Skip to content

Instantly share code, notes, and snippets.

View baileywickham's full-sized avatar
👓

Bailey Wickham baileywickham

👓
View GitHub Profile
@baileywickham
baileywickham / fpmap.rkt
Created May 12, 2021 22:30
fixed point map
(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))))
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
@baileywickham
baileywickham / venmo.py
Created December 20, 2021 05:50
Calculate the difference between two venmo users
import csv
import sys
me = ''
them = ''
paid_to_me = 0
paid_to_them = 0
payment_from_them = 0
payment_to_them = 0