A fork of mtelver's day10 project
at main2 17 lines 436 B view raw
1type t = Jv.t 2 3include (Jv.Id : Jv.CONV with type t := t) 4 5module Line = struct 6 type t = Jv.t 7 8 let from t = Jv.Int.get t "from" 9 let to_ t = Jv.Int.get t "to" 10 let number t = Jv.Int.get t "number" 11 let text t = Jv.Jstr.get t "text" 12 let length t = Jv.Int.get t "length" 13end 14 15let length t = Jv.Int.get t "length" 16let line n t = Jv.call t "line" [| Jv.of_int n |] 17let to_jstr_array t = Jv.call t "toJSON" [||] |> Jv.to_jstr_array