From f95748e82a354f2ac857359774ec3227705838af Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Tue, 26 Aug 2025 11:16:29 +0200 Subject: Prelude --- lib/ingcsv.ml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/ingcsv.ml') diff --git a/lib/ingcsv.ml b/lib/ingcsv.ml index 53258fe..edb8aaa 100644 --- a/lib/ingcsv.ml +++ b/lib/ingcsv.ml @@ -1,6 +1,5 @@ -open Core +open Prelude open Result.Let_syntax -module Time_ns = Time_ns_unix module Debit_credit = struct type t = Debit | Credit [@@deriving string, sexp_of] @@ -561,21 +560,6 @@ let tx_from_prim ptx ~ams_tz : (tx, parse_err_ext) result = type csv_err = Parse_err of parse_err_ext | Exn of exn -module List = struct - include List - - let map_result ~(f : 'a -> ('b, 'c) result) : 'a list -> ('b list, 'c) result - = - let open Result.Let_syntax in - let rec go = function - | [] -> return [] - | x :: xs -> - let%map x' = f x and xs' = go xs in - x' :: xs' - in - go -end - let read_channel (c : In_channel.t) ~ams_tz : (tx list, csv_err) result = let%bind ptxs = try -- cgit v1.2.3