diff options
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/main.ml | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/bin/main.ml b/bin/main.ml index 1c6c6c9..f2986ab 100644 --- a/bin/main.ml +++ b/bin/main.ml | |||
| @@ -1,29 +1,6 @@ | |||
| 1 | open Core | 1 | open Rdcapsis.Prelude |
| 2 | module Time_ns = Time_ns_unix | 2 | module Time_ns = Time_ns_unix |
| 3 | 3 | ||
| 4 | module List = struct | ||
| 5 | include List | ||
| 6 | |||
| 7 | let map_result ~(f : 'a -> ('b, 'c) result) : 'a list -> ('b list, 'c) result | ||
| 8 | = | ||
| 9 | let open Result.Let_syntax in | ||
| 10 | let rec go = function | ||
| 11 | | [] -> return [] | ||
| 12 | | x :: xs -> | ||
| 13 | let%map x' = f x and xs' = go xs in | ||
| 14 | x' :: xs' | ||
| 15 | in | ||
| 16 | go | ||
| 17 | end | ||
| 18 | |||
| 19 | module Result = struct | ||
| 20 | include Result | ||
| 21 | |||
| 22 | let unwrap = function | ||
| 23 | | Error _ -> failwith "Result.unwrap: unexpected (Error _)" | ||
| 24 | | Ok v -> v | ||
| 25 | end | ||
| 26 | |||
| 27 | let () = | 4 | let () = |
| 28 | let ams_tz = Time_ns.Zone.find_exn "Europe/Amsterdam" in | 5 | let ams_tz = Time_ns.Zone.find_exn "Europe/Amsterdam" in |
| 29 | let prim_txs = | 6 | let prim_txs = |