This repository has been archived on 2019-12-12. You can view files and clone it, but cannot push or open issues/pull-requests.
tildetown-scripts/tildetown-py/util.py

12 lines
236 B
Python
Raw Normal View History

2015-07-28 22:05:52 +00:00
def slurp(file_path):
contents = None
with open(file_path, 'r') as f:
contents = f.read()
return contents
def thread(initial, *fns):
value = initial
for fn in fns:
value = fn(value)
return value