Commit graph

4 commits

Author SHA1 Message Date
Matthew Piziak
9fa115500d Simplify FoldResult implementation
- Add tests for FoldResult
- Make documentation more explicit
- Assert failure accumulator in test

Submitted-by: Matthew Piziak <matthew.piziak@gmail.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2017-04-21 21:08:38 +02:00
0a70ea68ea libimagutil: Add copyright notice to all files 2016-10-01 17:35:06 +02:00
John Sirois
7f57e5e234 Move from a helper function to a typeclass.
This introduces the `FoldResut` trait to move from `func(receiver, ...)`
style to `receiver.func(...)` style. Also add a means to pass the
default result explicitly.
2016-07-14 07:28:54 -06:00
John Sirois
2c40b8734e Add a fold_ok utility.
Add a utility that folds an iterator into a result and uses it to reduce
boilerplate in the codebase.
2016-07-13 12:43:04 -06:00