aboutsummaryrefslogblamecommitdiffstats
path: root/lib/Utilities.ml
blob: 9ae0119d61a65a17abeabb0b38a6dbfdec2094cf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                                
 






                                         
   
module Result = struct
  let ( let* ) = Result.bind
  let fmap f m = Result.bind m f

  let sequence ms = List.fold_right
                      (fun m acc ->
                        let* acc = acc in
                        let* m = m in
                        Ok (m::acc))
                      ms
                      (Ok [])
end