Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
projects:split-bill [2024/07/28 11:50] – add example pfmprojects:split-bill [2024/07/28 20:56] (current) – add Itertools::permutations pfm
Line 27: Line 27:
   * Use a reasonable type to represent amounts --- ''f32'' will break calculations sooner or later.   * Use a reasonable type to represent amounts --- ''f32'' will break calculations sooner or later.
   * Extract expense calculation code to a Rust library and then use it in the CLI tool, to be able to then write other applications (GUI maybe?).   * Extract expense calculation code to a Rust library and then use it in the CLI tool, to be able to then write other applications (GUI maybe?).
 +  * Use [[https://docs.rs/itertools/latest/itertools/trait.Itertools.html#method.permutations|Itertools.permutations]] to generate a sequence of permutations of debts to try them until a  transaction plan is identified that ensures minimum number transactions.