add profile metadata
This commit is contained in:
parent
69677f5e1b
commit
f8f4b9b110
6 changed files with 171 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue