12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576openPpxlibtypet=|List|Array|Iarrayletto_string=function|List->"list"|Array->"array"|Iarray->"iarray";;letof_string_opt=function|"list"->SomeList|"array"->SomeArray|"iarray"->SomeIarray|_->None;;letis_supporteds=of_string_opts|>Option.is_someletof_strings=of_string_opts|>Base.Option.value_exn~message:("Unsupported collection type "^s);;letto_module_exprtloc=matchtwith|List->[%exprList]|Array->[%exprArray]|Iarray->[%exprIarray];;letmapt~(iter_or_map:Iter_or_map.t)loc=matcht,iter_or_mapwith|List,Iter->[%exprPpx_hardcaml_runtime0.List.iter]|List,Map->[%exprPpx_hardcaml_runtime0.List.map]|Array,Iter->[%exprPpx_hardcaml_runtime0.Array.iter]|Array,Map->[%exprPpx_hardcaml_runtime0.Array.map]|Iarray,Iter->[%exprPpx_hardcaml_runtime0.Iarray.iter]|Iarray,Map->[%exprPpx_hardcaml_runtime0.Iarray.map];;letmapit~(iter_or_map:Iter_or_map.t)loc=matcht,iter_or_mapwith|List,Iter->[%exprPpx_hardcaml_runtime0.List.iteri]|List,Map->[%exprPpx_hardcaml_runtime0.List.mapi]|Array,Iter->[%exprPpx_hardcaml_runtime0.Array.iteri]|Array,Map->[%exprPpx_hardcaml_runtime0.Array.mapi]|Iarray,Iter->[%exprPpx_hardcaml_runtime0.Iarray.iteri]|Iarray,Map->[%exprPpx_hardcaml_runtime0.Iarray.mapi];;letmap2t~(iter_or_map:Iter_or_map.t)loc=matcht,iter_or_mapwith|List,Iter->[%exprPpx_hardcaml_runtime0.List.iter2_exn]|List,Map->[%exprPpx_hardcaml_runtime0.List.map2_exn]|Array,Iter->[%exprPpx_hardcaml_runtime0.Array.iter2_exn]|Array,Map->[%exprPpx_hardcaml_runtime0.Array.map2_exn]|Iarray,Iter->[%exprPpx_hardcaml_runtime0.Iarray.iter2_exn]|Iarray,Map->[%exprPpx_hardcaml_runtime0.Iarray.map2_exn];;letinittloc=matchtwith|List->[%exprPpx_hardcaml_runtime0.List.init]|Array->[%exprPpx_hardcaml_runtime0.Array.init]|Iarray->[%exprPpx_hardcaml_runtime0.Iarray.init];;letto_listtloc=matchtwith|List->[%exprPpx_hardcaml_runtime0.List.to_list]|Array->[%exprPpx_hardcaml_runtime0.Array.to_list]|Iarray->[%exprPpx_hardcaml_runtime0.Iarray.to_list];;