serde-generate 0.33.0

Library to generate (de)serialization code in multiple languages
Documentation
1
2
3
4
5
6
7
(* Copyright (c) Zefchain Labs, Inc.
 * SPDX-License-Identifier: MIT OR Apache-2.0 *)

type 'a r = {r: 'a; depth: int}

let list_depth l = List.fold_left (fun acc x -> max acc x.depth) 0 l
let list_result l = List.map (fun x -> x.r) l