diff options
Diffstat (limited to 'lib/ingcsv.ml')
-rw-r--r-- | lib/ingcsv.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ingcsv.ml b/lib/ingcsv.ml index edb8aaa..f9cd95e 100644 --- a/lib/ingcsv.ml +++ b/lib/ingcsv.ml | |||
@@ -9,9 +9,9 @@ module Cents = struct | |||
9 | type t = Z.t | 9 | type t = Z.t |
10 | 10 | ||
11 | let of_string s = | 11 | let of_string s = |
12 | (* TODO: consider being more bitchy here *) | 12 | let high, low = String.lsplit2_exn s ~on:',' in |
13 | String.lsplit2_exn s ~on:',' |> Tuple2.map ~f:Z.of_string | 13 | assert (String.length low = 2); |
14 | |> fun (high, low) -> Z.((high * ~$100) + low) | 14 | Z.((of_string high * ~$100) + of_string low) |
15 | end | 15 | end |
16 | 16 | ||
17 | module Transaction_type = struct | 17 | module Transaction_type = struct |