Seq.fold (fun acc cur -> match acc with | None -> cur |> Result.map (fun x -> [x]) |> Result.mapError (fun x -> [x]) |> Some | Some res -> (match res with | Ok x -> cur |> Result.map (fun y -> x::y) | Error e -> cur |> Result.mapError (fun x -> x::e)) |> Some ) None results