# vecfold: Fold vectors of Results into Result of vector This package provide a generic way to _"unwrap"_ a `Vec>` into `Result, &E>`. Here is an example: ```rust let valid: Vec> = "1,2,3".split(",").map(|x| x.parse::()).collect(); let invalid: Vec> = "1,2,a".split(",").map(|x| x.parse::()).collect(); // happy path, no errors, just the values assert_eq!(vec![&1, &2, &3], valid.foldr().unwrap()); // sad path returns the error assert!(invalid.foldr().is_err()); ``` If you need to collect all errors you can use `.foldr_bisect`. It converts `Vec>`, to `(Vec<&T>, Vec<&E>)`. ```rust // happy path, no errors, return empty error vector assert_eq!((vec![&1, &2, &3], vec![]), valid.foldr_bisect()); // sad path, populate error vector let (ok, _) = invalid.foldr_bisect(); assert_eq!(vec![&1, &2], ok); ```