1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980moduleString=struct[@@@ocaml.warning"-3-32"]letlowercase_ascii=StringLabels.lowercaseletuppercase_ascii=StringLabels.uppercaseletcapitalize_ascii=StringLabels.capitalizeincludeStringendmoduleChar=struct[@@@ocaml.warning"-3-32"]letuppercase_ascii=Char.uppercaseincludeCharendmoduleList=structincludeListletrecfilter_mapf=function[]->[]|x::l->matchfxwithNone->filter_mapfl|Somey->y::filter_mapflletconcat_mapfl=List.mapfl|>List.flattenletmap_firstf=function|[]->[]|x::l->lety=f~is_first:truexiny::List.map(f~is_first:false)lletinitnf=Array.to_list(Array.initnf)letmapilf=Array.of_listl|>Array.mapif|>Array.to_listletrecfind_mapf=function|[]->None|x::l->matchfxwithNone->find_mapfl|Some_asy->y(* replace first occurrence, if any *)letrecassoc_updatekv=function|(k',_)asx::l->ifk=k'then(k,v)::lelsex::assoc_updatekvl|[]->[]letrecinsert_sept~sep=matchtwith|[]|[_]->t|x::xs->x::sep@(insert_sepxs~sep)endmoduleOption=structletmapf=function|None->None|Somes->Some(fs)letvalue_exn=function|None->failwith"Option.value_exn"|Somes->sendletsprintf=Printf.sprintfletprintf=Printf.printfleteprintf=Printf.eprintfletbprintf=Printf.bprintfletfprintf=Printf.fprintf