Skip to content

After a trip with several people: calculate who owes what to whom

License

Notifications You must be signed in to change notification settings

mklinik/travelExpenses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

travelExpenses

Since my first trip with friends, I had the following problem. During the trip, people randomly pay stuff for other people. For example, Klaus pays for the cottage for everybody, Hans pays tram tickets, but only for himself, Elke and Erna. Erna pays lunch for Elke, and so on. In the end, it's time for everybody to pay their debts to the other people. Calculating all that by hand, or with a spreadsheet, is tedious.

Haskell to the resuce.

During the trip, jot down when someone buys something. Then let travelExpenses determine who owes what to whom.

Usage

  1. Edit the list named "input" in Main.hs to include all the bills.

  2. Run the program:

     $ runhaskell Main.hs
    

About

After a trip with several people: calculate who owes what to whom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published