add profile metadata

This commit is contained in:
Swrup 2022-03-08 01:19:35 +01:00
parent 60c201d2d4
commit 67f3a6eb3d
6 changed files with 171 additions and 41 deletions

View file

@ -12,3 +12,11 @@ let ( let^ ) o f =
| Ok x -> f x
let ( let* ) o f = Result.fold ~ok:f ~error:Result.error o
let unwrap_list f ids =
let l = List.map f ids in
let res = List.find_opt Result.is_error l in
match res with
| None -> Ok (List.map Result.get_ok l)
| Some (Ok _) -> assert false
| Some (Error _e as error) -> error