A script to simplify people paying each other for items in groups.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
input.txt
payments.hs

README.md

group-payments

A script to simplify people paying each other for items in groups. Algorithm co-conceived with Tom McLaughlin.

How to use

Run as follows

$ runhaskell payments.hs < input.txt

Input file format

You need an input file where each line conforms to the following format (where the '<' and '>' aren't in your file; they're just delimiters for purposes of describing input):

<item_name> <payer_name> <list_of_recipients_of_item> <cost>

Each segment (e.g. ) can have no spaces, and must be a number. Additionally, must be of the following format:

[<name_0>,<name_1>,...,<name_n>]

, where there are no spaces after the commas, and the '[' and ']' are present.

See input.txt for an example.