Caml1999I037z!k;~S2Stdlib__MoreLabelsӠ'HashtblN@!tQ;!a@C!b@B@B@A&Stdlib'Hashtbl!t@@@DOO@BB@@@.moreLabels.mliO  O  @@@@-@@A@&createR&random&optionL$boolE@@@E@@@F@#intA@@@GE!a@I!b@H@@@J@@K@@L@1R  2S 4 T@@]A@@%clearS@!a@N!b@M@@@O$unitF@@@P@@Q@OzPz@@{B@@%resetT@7!a@S!b@R@@@T@@@U@@V@k~wyl~w@@C@@$copyU@S!a@Y!b@X@@@W`  @@@Z@@[@   /@@D@@#addV@p!a@]!b@^@@@\#key$data _@@@_@@`@@a@@b@`b`@@E@@$findW@!a@d!b@e@@@c@ @@f@@g@8:8[@@F@@(find_optX@!a@i!b@j@@@h@ Ҡ @@@k@@l@@m@ @@G@@(find_allY@͠!a@o!b@p@@@n@ $listK @@@q@@r@@s@@@2H@@#memZ@!a@v!b@t@@@u@  @@@w@@x@@y@$%@@PI@@&remove[@ !a@|!b@z@@@{@ @@@}@@~@@@B  C 1@@nJ@@'replace\@*!a@!b@@@@#key$data @@@@@@@@@@fg@@K@@$iter]!f#key!a@$data!b@:@@@@@@@@f@@@E@@@@@@@@UWU@@L@@2filter_map_inplace^!f#key!a@$data!b@@@@@@@@@@@@r@@@@@@@@"""S"]@@M@@$fold_!f#key!a@$data!b@@#acc@@@@@@@@@@@$init@@@@@@@###$-@@N@@&length`@ՠ!a@!b@@@@@@@@@@ '' ''@@5O@@)randomizea@@@@@@@@@@((((@@HP@@-is_randomizedb@@@@@@@@@@/,M,O0,M,o@@[Q@@'rebuildc&random.+@@@@@@@#!a@!b@@@@0  @@@@@@@@X,,Y-;-Y@@R@@*statisticsd;@@,num_bindingsv@@I@@@j0>0Bk0>0T@@T@+num_bucketsw@@U@@@v00w00@@U@1max_bucket_lengthx@@a@@@0101@@V@0bucket_histogramy@@%arrayJs@@@@@@1M1Q1M1l@@W@@@A'Hashtbl*statistics@@@@@@@00"2'2*@@@@S@A@%statse@!a@!b@@@@^@@@@@@$2,2.$2,2R@@X@@&to_seqf@!a@à!b@@@@#Seq!t@@@@@@@@@@,3.30,3.3Y@@Y@@+to_seq_keysg@ˠ!a@ɠ@@@@@ #Seq!t@@@@@@744745@@-Z@@-to_seq_valuesh@@̠!b@@@@&#Seq!t @@@@@@;5S5U;5S5}@@J[@@'add_seqi@!a@Ӡ!b@@@@@H#Seq!t@@@@@@@@@@@@@@@J?55K?55@@v\@@+replace_seqj@2!a@۠!b@@@@@t#Seq!t@@@@@@@)@@@@@@@@vC6>6@wC6>6v@@]@@&of_seqk@#Seq!t@!a@䠠@!b@@@@@@t @@@@@@G66G66@@^@@*HashedTypel!tx;@@@A@@@@@o@r<<r<<@@`@@$hashz@@@@?@@@@@@A@u<<u<= @@a@@@@m<7<9??@b@@!Sm#key{;@@@A@@@@@@@#@@+@@@@c@A@!t|;!a@@A@A@O@B@@@@,@2@,@<@@@@)d@A@&create}@@@@!a@@@@@@@@=@C@=@[@@Ae@@%clear~@!a@@@@@@@@@@,@\@b-@\@z@@Xf@@%reset@+!a@@@@@@@@@@C@{@D@{@@@og@@$copy@B!a@@@@J@@@@@@Z@@[@@@@h@@#add@Y!a@@@@#key@@@$data0@@@@@@@@@@}@@~@@@@i@@&remove@|!a@@@@@!@@@L@@@@@@@@@A@A%@@j@@$find@!a@@@@@=@@@ @@@@@A&A,A&AH@@k@@(find_opt@!a@@@@@U@@@@@@@@@@@AIAOAIAv@@l@@(find_all@͠!a@@@@@r@@@@@@@@@@@AAAA@@m@@'replace@!a@@@@#key@@@$data@@@@@@@@@@ AAAA@@9n@@#mem@ !a@@@@@@@@@@@@@@@@)AA*AB@@Uo@@$iter!f#key@@@$data!a@@@@@@@@@? @@@@@@@@@@@SBBTBBW@@p@@2filter_map_inplace!f#key@@@$data!a@a@@@@@@@@j@@@1@@@@@@@@~BXB^BB@@q@@$fold!f#key@@@$data!a@@#acc@ @@@@@@@@@@$init@@ @@ @@ @BBBC(@@r@@&length@!a@ @@@@@@@@@C)C/C)CG@@s@@%stats@!a@@@@@@@@@@CHCNCHCk@@t@@&to_seq@֠!a@@@@#Seq!t@@@@@@@@@@@@@CCCC@@'u@@+to_seq_keys@@@@@#Seq!t@@@@@@@@@CCCC@@Bv@@-to_seq_values@!a@!@@@ 9#Seq!t @@@"@@#@1D D2D D3@@]w@@'add_seq@0!a@%@@@$@V#Seq!t@@@@&@@@'@@@(@@@)@@*@@+@[DNDT\DND@@x@@+replace_seq@Z!a@-@@@,@#Seq!t@ @@@.@@@/@@@08@@@1@@2@@3@DDDD@@y@@&of_seq@#Seq!t@*@@@4@!a@7@@5@@@6@@@8@@9@DDDE@@z@@@@@@E5E<@{@@Ӡ$Maken@!Hw;@@@A!t@@@.@@@@EEEE@@@@}@A@;!a@/@A@A'Hashtbl$Make!t@@@0O@B@@@EEEE@@@@~@A@@@@@1&@2@@@3@@4@@@@ @5@@@6@@@7@@8@@@@@9@@@:@@@;@@<@@@@(@>@@@=-@@@?@@@@@@@7@C@@@At@@@B @@@D@@E@@F@@G@@@@M@H@@@I@@@@J@@@K@@L@@M@@@@`@P@@@N@)@@@O@@Q@@R@@@@p@U@@@S@9@@@T @@@V@@W@@X@@@@@[@@@Y@M@@@Z @@@\@@]@@^@@@@@a@@@_a@@@` @@@b@@c@@d@@e@@@@@f@@@g@v@@@h@@@i@@j@@k@@@}@@@l{y@pv@@@m@@n@@o@͠ @@@qu@@@r@@s@@t@t@q@pom@@@uki@yf@@@v@@w@@x@ @@@ze@@@{@@|@@}@d@a@`_]@@@~[Y@@V@@@@@@@@ @@@S  @@@@@@@Q@N@M@L@@@@I@@@@@@H@E@D@C@@@@[@@@@@@@@=@<@*;@@@@287@@@@@@@@@@@@@6@3@2@DD@@@@L10@@@@@@@@@/@,@+@X*@@@@`'&@@@@@@%@"@!@i @@@@@s@;@@@@@@@@@@@@@@@@@@@@@@@@@@Z@@@@@@@@@@@@@@@@@@ @ @  @r@@@@@@@@@@@@@@@@@@@@EtEx@@@@0SeededHashedTypeo!t;@@@A@@@@@HsHyHsH@@@@@@A@%equal@@@@$@@@@%@@@&@@'@@(@HHHH@@ A@@+seeded_hash@@@@)@@@@*@@@+@@,@@-@I II I/@@ B@@@@HJHLJJ@ C@@'SeededSp#key;@@@A@@@@@ JJ JK@@@@ /D@A@!t;!a@@A@A@O@B@@@ KK  KK@@@@ @E@A@&create&random  @@@@@@@ @@@)!a@@@@@@@@@ 8KK 9K^K|@@ dF@@%clear@!a@@@@ @@@@@@ OK}K PK}K@@ {G@@%reset@+!a@@@@ @@@@@@ fKK gKK@@ H@@$copy@B!a@@@@J@@@@@@ }KK ~KK@@ I@@#add@Y!a@@@@#key@@@$data S@@@@@@@@@@ KK KL @@ J@@&remove@|!a@@@@@!@@@ o@@@@@@@@ L L L L2@@ K@@$find@!a@@@@@=@@@ @@@@@ L3L9 L3LU@@ L@@(find_opt@!a@@@@@U@@@ ޠ@@@@@@@@ LVL\ LVL@@ M@@(find_all@͠!a@@@@@r@@@ @@@@@@@@ LL LL@@ :N@@'replace@!a@@@@#key@@@$data @@@@@@@@@@ 0LL 1LL@@ \O@@#mem@ !a@@@@@@@@ 4@@@@@@@@ LLM MLM@@ xP@@$iter!f#key@@@$data!a@ @@@@@@@@? @@@ )@@@@@@@@ vMM% wMM^@@ Q@@2filter_map_inplace!f#key@@@$data!a@ @@@@@@@@j@@@ T@@@@@@@@ M_Me MM@@ R@@$fold!f#key@@@$data!a@@#acc@@@@@@@@@@@$init@@@@@@@ MM MN/@@ S@@&length@!a@@@@ @@@@@@ N0N6 N0NN@@ T@@%stats@!a@@@@>@@@@@@ NONU NONr@@ &U@@&to_seq@֠!a@@@@ #Seq!t@@@@@@@@@@@@@ NtNz NtN@@ JV@@+to_seq_keys@6@@@@ >#Seq!t@@@@@@@@ @ 9NN :NN@@ eW@@-to_seq_values@!a@ @@@  \#Seq!t @@@ @@ @ TNO UNO'@@ X@@'add_seq@0!a@@@@@ y#Seq!t@@@@@@@@@@ 1@@@@@@@@ ~OBOH OBOv@@ Y@@+replace_seq@Z!a@@@@@ #Seq!t@ @@@@@@@@@ [@@@@@@@@ OO OO@@ Z@@&of_seq@ #Seq!t@*@@@@!a@!@@@@@ @@@"@@#@ OO OP@@ [@@@@ JJ P)P0@ \@@Ӡ*MakeSeededq@!Hv-;@@@A!t@@@@@@@ PP PP@@@@ ^@A@;!a@@A@A 'Hashtbl*MakeSeeded!t@@@O@B@@@ PP PP@@@@ 5_@A@ @@@@@@@@@@/@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@!@@@"@@#@@@@(@%@@@$-@@@&@@'@@@@7@*@@@(}@@@) @@@+@@,@@-@@.@@@@M@/@@@0@@@@1@@@2@@3@@4@@@@`@7@@@5@)@@@6@@8@@9@@@@p@<@@@:@9@@@; @@@=@@>@@?@@@@@B@@@@@M@@@A @@@C@@D@@E@@@@@H@@@Fa@@@G @@@I@@J@@K@@L@@@@@M@@@N@v@@@O@@@P@@Q@@R@@@@@@S@W@@@T@@U@@V@͠ @@@X~@@@Y@@Z@@[@}@z@yxv@@@\tr@`o@@@]@@^@@_@ @@@an@@@b@@c@@d@m@j@ihf@@@edb@i@_@k@@f@@g@@h@ @@@j\  @@l@@m@@n@Z@W@V@U@o@@@pR@@@q@@r@Q@N@M@L@s@@@t @@@u@@v@I@F@E@*D@x@@@w ^A@@@@@y@@@z@@@{@@|@?@<@;@D p@}@@@~ x:9@@@@@@@@@8@5@4@X3@@@@ 0/@@@@@@.@+@*@i)@@@@@ &%@;@@@@@@@@@$@@@@@@@@#@ @@@@@@@ @Z@@@@@@@@@@@@@@@@@@@@ @r@@@@@@@@@@@@@@@@@ @@@ PP@`@@@$hashr@!a@ @@@@@@ T T T T#@@a@@+seeded_hashs@ @@@@!a@ @@@@@@@@UU UUB@@1b@@*hash_paramt@ @@@@ @@@@!a@@@@@@@@@@@$$UU%$UU@@Pc@@1seeded_hash_paramu@@@@@@@@@@@@@!a@(@@@@@@@@@@@@I7Z$Z&J7Z$Z\@@ud@@@@Mc,,Nee@ye@@@Ӡ#MapO@+OrderedType!t;@@@A@@@@@diieii@@@@f@A@'compare@@@@ @@@@[@@@@@@@@|ii}ij@@g@@@@iikk@h@@!S#key;@@@A@@@@@lUl[lUlc@@@@i@A@!t;!a@@A@A@I@B@@@llll@@@@j@A@%empty!a@@@@@llll@@k@@#add#key7@@@$data!a@@$ @@@( @@@@@@@@@@mmmm?@@l@@+add_to_list#key#@@@$data!a@@F  @@@@@@O @@@@@@@@@@@@@ooooK@@/m@@&update#keyO@@@!f@ !a@@@@ @@@@@@~@@@@@@@@@@@@@1pp 2ppa@@]n@@)singleton@{@@@@!a@@@@@@@@@IrrJrs @@uo@@&remove@@@@@!a@@@@@@@@@@@@essfss@@p@@%merge!f@@@@@k!a@@@@@v!b@@@@!c@@@@@@@@@@@@@@@@@@@@@@@@@@@@ttuDu`@@q@@%union!f@@@@@!a@@ @@@@@@@@@@@@@@"@@@&@@@@@@@@@@ ww# wwf@@r@@(cardinal@5!a@ @@@ @@@ @@ @yyyy@@s@@(bindings@L!a@@@@ @F@@@@@@@@@@@@ zzzz;@@9t@@+min_binding@m!a@@@@@c@@@@@@@@@)&{F{L*&{F{o@@Uu@@/min_binding_opt@!a@@@@.@@@@@@@@@@@@@J,|8|>K,|8|l@@vv@@+max_binding@!a@@@@@@@@ @@@!@@"@f2},}2g2},}U@@w@@/max_binding_opt@Ơ!a@$@@@#k@@@@%@@@&@@@'@@(@7}}7}~@@x@@&choose@!a@*@@@)@@@@+@@@,@@-@<~~<~~@@y@@*choose_opt@!a@/@@@.@@@@0@@@1@@@2@@3@BB@@z@@$find@@@@4@)!a@6@@@5@@7@@8@JJ@@{@@(find_opt@&@@@9@A!a@;@@@: @@@<@@=@@>@NmsNm@@%|@@*find_first!f@G@@@?@@@@@@A@f!a@C@@@B@\@@@D@@@E@@F@@G@"S;A#S;t@@N}@@.find_first_opt!f@p@@@H @@@I@@J@!a@L@@@K4@@@@M@@@N@@@O@@P@@Q@P_kqQ_k@@|~@@)find_last!f@@@@RN@@@S@@T@!a@V@@@U@@@@W@@@X@@Y@@Z@yeze@@@@-find_last_opt!f@@@@[w@@@\@@]@!a@_@@@^@@@@`@@@a@@@b@@c@@d@kk@@@@$iter!f#key@@@e$data!a@iz@@@f@@g@@h@ @@@j@@@k@@l@@m@tGMtG@@@@$fold!f#key!@@@n$data!a@r@#acc@t@@o@@p@@q@J@@@s$init@@u@@v@@w@z{@@)@@#map!f@!a@y!b@{@@x@k @@@zo @@@|@@}@@~@ 0@@J@@$mapi!f@l@@@@!a@!b@@@@@@ @@@ @@@@@@@@D|E|@@p@@&filter !f@@@@@!a@H@@@@@@@@ @@@@@@@@@@@jBHkBy@@@@*filter_map !f@@@@@!a@t!b@@@@@@@@@@@@@@@@@@@@ @@@@)partition !f@@@@@!a@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@%split @@@@@*!a@@@@@6 @@@@٠@@@@C@@@@@@@@@@!'!X@@@@(is_empty @R!a@@@@@@@@@@ +1 +K@@5@@#mem @S@@@@n!a@@@@ @@@@@@@@%~&~@@Q@@%equal #cmp@!a@@&@@@@@@@@@@@@@@@6@@@@@@@@@@N O K@@z@@'compare #cmp@!a@@F@@@@@@@@@@@@Ġ@@@V@@@@@@@@@@wOUxO@@@@'for_all !f@@@@@!a@{@@@@@@@@ @@@@@@@@@@@-3-e@@@@&exists !f@@@@@!a@@@@@@@@@ @@@@@@@@@@@@@@@'to_list @#!a@@@@נ@@@@ᠠ@@@@@@@@@@@@@'of_list @@6@@@堠@!a@@@@@@V@@@@@@6<6a@@1@@&to_seq @e!a@@@@(#Seq!t@b@@@@@@@@@@@@)!*F@@U@@*to_rev_seq @!a@@@@L#Seq!t@@@@@@@@@@@@@MN@@y@@+to_seq_from @@@@@!a@@@@u#Seq!t@@@@@@@@@@@@@@@v*0w*a@@@@'add_seq @#Seq!t@@@@@!a@@@@@@@ @@@@@@@@@@@6@@@@&of_seq @#Seq!t@@@@@!a@ @@@@@ @@@ @@ @@@@@@@ll @@@Ӡ$Make@#OrdᐐN ;@@@A!t@@@{@@@@iri@@@@@A@T ;!a@|@A@A#Map$Make!t@@@}I@B@@@@@@@-@A@_ !^@~@@@@[@X@W V=@@@TR@@@@@ @@@@@@@@@@O@L@K J@@@HF@@+C @@@@@@3B@@@@@@@@@@@@@A@>@= <5@@@:@87@@@@4@@@@@@S @@@W@@@@@@@@@@3@0@/ @U@@@@.@g@@@@@@@@+@(@' @e@@@@v&@@@@{@@@@@@@@#@ @ @{@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @   @@@@@ @@@@@@@@@@@@à @@@@ɠ@@@͠@@@@@@@@@@@@ @נ@@@@@@@@@@@@ @@@@@@@@@Ǡ@@@@@@@@@@@ @@@@@@@@@͠@ @@@@@@@ @@@@@@@@@Ҡ@@@@@@@@@@@ @)@@@@@&@@@ؠ@ @@@@@@@ @=@@@@Ҡ@=@@@ݠ@@@@@@@@@@@ !@U@@@@@R@@@㠠@ @@@@@@@ "@i@@@@@i@@@蠠@@@@@@@@@@@ #@u@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@ %@@@@@@@@@@@@@@@@@@@ @@@@@@@@@ &@@@@@@@@@@͠@@@@@@@@@@@@@@@@@@ @@@ '@@@@ @@@ @@ @@@@@ @@@@@ @@@@@@@@@ (@@@@@@@@@@ @@@@@ @@@@@@@@@@@@@@@~@} )|z@@@xv@!s@@@@@@@ @2 @@@"r@@@#@@$@@%@q@n@m *lj5@@@&hf@*@c@,@@'@@(@@)@L @@@+`  @@-@@.@@/@^@[@Z +Y@W@1T@3@@0@^@@@2b @@@4@@5@@6@Q@N@M ,L@b@@@7@J@:G@<@@8@@9@w@@@;{ @@@=@@>@@?@D@A@@ -?@{@@@@@=@E:@@@A@@B@@C@ @@@D @@@F@@G@@H@9@6@5 .4@@@@I@2@M/.@O@@@J@@K@@L@ @@@N @@@P@@Q@@R@+@(@' /&@@@@S@$@Y!@@@T@@U@@V@ʠ @@@W@Ҡ@@@Z@ؠ@@@X@@[@@\@@]@ @@ 0@@@@^@@b@@@_@ @@@c@@@@a@@@@`@@d@@e@@f@@@ 1@@g@@@h@@@i@@j@@ @  2@@@@k@ @l@@@m@@@n@@o@@p@@@ 3@@u@@@@q@@r@@s@1 @@@t@7@@@v@@@w@@x@@y@@z@@@ 4@@@@@@{@@|@@}@N @@@~@T@@@@@@@@@@@@@@@ 5@W@@@@@@@@@@@@@n @@@@@@@@@@@@@ 6@q@@@@@@@@@@@@@ @@@@@@@@@@@@@ 7@@@@@͠@@@@@@@@@@@@@@@ 8@Ǡ@@@@@@@@@@@@@@@@@@@ 9@Š@@@@@@@@@@@@@@@@@@@ :@ߠ@@@@@@@@@@@@@@@@@@@ ;@@@@@@@@@@@@@@@@@@@@@@@@@@ <@1@@@@@@@@@@@@*@@@. @@@@@@@@@@ =@Q@5@@@@@@@@@@H@@@@@@@@@@U6:T@@@@@@XeeY@@@@Ӡ#SetP@+OrderedType >!t B;@@@A@@@@@o#39p#3?@@@@@A@'compare C@@@@v@@@@wf@@@x@@y@@z@&nt&n@@@@@@!.fm@@@!S ?#elt D;@@@A@@@@@66@@@@@A@!t E;@@@A@@@@@99@@@@@A@%empty F@@@@<?E<?Q@@@@#add G@)@@@@@@@@@@@@@@@?ou?o@@@@)singleton H@@@@)@@@@@@EE@@@@&remove I@(@@@@<@@@?@@@@@@@@HH'@@@@%union J@M@@@@R@@@U@@@@@@@@N:@N:V@@3@@%inter K@c@@@@h@@@k@@@@@@@@QpvQp@@I@@(disjoint L@y@@@@~@@@@@@@@@@@4T5T@@`@@$diff M@@@@@@@@@@@@@@@@JXKX.@@v@@(cardinal N@@@@;@@@@@@\\]\@@@@(elements O@@@@k@@@@@@@@@rasa0@@@@'min_elt P@@@@@@@@@@g#g8@@@@+min_elt_opt Q@@@@@@@@@@@@@ll@@@@'max_elt R@@@@@@@@@@rr@@@@+max_elt_opt S@@@@@@@@@@@@@v39v3Y@@@@&choose T@@@@@@@@@@{{@@@@*choose_opt U@-@@@Ѡ%@@@@@@@@@@@@@$find V@4@@@@H@@@<@@@@@@@@@@)@@(find_opt W@J@@@@^@@@V@@@@@@@@@@@@@D@@*find_first X!f@i@@@@@@@@@@@@u@@@@@@@@67@@b@@.find_first_opt Y!f@@@@4@@@@@@@@@C@@@@@@@@@@@YZ@@@@)find_last Z!f@@@@W@@@@@@@@@@@@@@@@@wx@@@@-find_last_opt [!f@@@@u@@@@@@@@@@@@@@@@@@@@9@@@@$iter \!f@@@@c@@@@@@@@@l@@@@@@@@TZT@@@@$fold ]!f@ @@@@#acc@@@@@@$@@@$init  @@@@@@ @TZT@@@@#map ^!f@+@@@ .@@@ @@ @B@@@ E@@@@@@@@X^X@@#@@&filter _!f@H@@@@@@@@@`@@@c@@@@@@@@msm@@A@@*filter_map `!f@f@@@m@@@@@@@@@@@@@@@@@@@@78@@c@@)partition a!f@@@@ 5@@@!@@"@@@@#@@@@%@@@@$@@&@@'@@(@^"_N@@@@%split b@@@@)@@@@*@@@@-@f@@@,@@@@+@@.@@/@@0@HNHq@@@@(is_empty c@@@@1}@@@2@@3@$*$A@@@@#mem d@@@@4@@@@5@@@6@@7@@8@tztÓ@@@@%equal e@@@@9@ @@@:@@@;@@<@@=@@@@@'compare f@@@@>@$@@@?@@@@@@A@@B@msmč@@@@&subset g@6@@@C@;@@@D@@@E@@F@@G@ @@@@'for_all h!f@B@@@H@@@I@@J@Z@@@K@@@L@@M@@N@ŀņŀů@@<@@&exists i!f@a@@@O@@@P@@Q@y@@@R@@@S@@T@@U@/ 0 B@@[@@'to_list j@@@@V>@@@W@@@X@@Y@EF@@q@@'of_list k@Q@@@Z@@@[@@@\@@]@[=C\=]@@@@+to_seq_from l@@@@^@@@@_~#Seq!t@@@`@@@a@@b@@c@yBHzBo@@@@&to_seq m@@@@d#Seq!t@@@e@@@f@@g@ $@@@@*to_rev_seq n@@@@h#Seq!t@@@i@@@j@@k@"v|"vɛ@@@@'add_seq o@#Seq!t@@@l@@@m@@@@n@@@o@@p@@q@&&@@@@&of_seq p@#Seq!t@@@r@@@s0@@@t@@u@*gm*gʈ@@@@@@1-@@@Ӡ$Make @@#Ord Aa q;@@@A!t@@@@@@@1>G1>W@@@@/@A@g r;@@@A#Set$Make!t@@@@@@@2Xa2Xy@@@@C@A@q s@@@@p@m@l t@3@@@@@@@@@@@@@@@k@h@g u@@@@@@@@@@f@c@b v@@@@@-@@@0@@@@@@@@a@^@] w@9@@@@>@@@A@@@@@@@@\@Y@X x@J@@@@O@@@R@@@@@@@@W@T@S y@[@@@@`@@@R@@@@@@@@Q@N@M z@l@@@@q@@@t@@@@@@@@L@I@H {@}@@@G@@@@@@F@C@B |@@@@A@@@@@@@@@@@=@< }@@@@@@@@@@;@8@7 ~@@@@6@@@@@@@@@5@2@1 @@@@@@@@@@0@-@, @@@@+@@@@@@@@@*@'@& @@@@@@@@@@%@"@! @@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @ @@@ @@@@@@@@@@@@@@@@@ @ @ @!@@@@@@@@@3@@@/@@@@@@@@@@ @@@ @;@@@ @@@ @@ @M@@@ F@@@@@@@@@@ @Q@@@@@@@@@c@@@_@@@@@@@@@@@@@ @k@@@@@@@@@}@@@@@@@@@@@@@ @@@@ @@$@@!@@"@@@@#@@%@@&@@'@@@ @@@@(@@@)@@*@@@@+@@@,@@-@@.@@@ @@@@/@@@0@@1@@@@2@@@3@@4@@5@@@ @@@@6Ǡ@@@7@@@8@@9@@@@:@@@;@@<@@=@@@ @@@@>@@@?@@@@@@@A@@@@C@@@@B@@D@@E@@F@@@ @@@@G@@@@H@@@@K@@@@J@@@@I@@L@@M@@N@@@ @"@@@O@@@P@@Q@@@ @$@@@R@3@@@S@@@T@@U@@V@@@ @?@@@W@D@@@X@@@Y@@Z@@[@@@ @P@@@\@U@@@]@@@^@@_@@`@@@ @a@@@a@f@@@b@@@c@@d@@e@@@ @j@@@f@@@g@@h@|@@@i@@@j@@k@@l@@@ @@@@m@@@n@@o@@@@p@@@q@@r@@s@@@ @@@@t@@@u@@@v@@w@@@~ @}@@@x@@@y@@@z@@{@|@y@x @@@@|@@@@} wv@@@~@@@@@@@@u@r@q @@@@!po@@@@@@@@@n@k@j @@@@!ih@@@@@@@@@g@d@c @!(ba@@@@@@@@@@@@@@@@@@`@]@\ @!?[Z @@@@@@@@@@@@Y@V@@@!;0 $@!f@@@@@!>!?6@!j@@@@(z2Stdlib__MoreLabels0U JH޼+Stdlib__Set0\$;7 +Stdlib__Seq0nwzG&amg+Stdlib__Map0L5xE|O0~,J-/Stdlib__Hashtbl0ѱN][/!.Stdlib__Either0Vy`u~c à&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@@@Caml1999T037ljrC2Stdlib__MoreLabels*ocaml.text&_none_@@A | Extra labeled libraries. This meta-module provides labelized versions of the {!Hashtbl}, {!Map} and {!Set} modules. This module is intended to be used through [open MoreLabels] which replaces {!Hashtbl}, {!Map}, and {!Set} with their labeled counterparts. For example: {[ open MoreLabels Hashtbl.iter ~f:(fun ~key ~data -> g key data) table ]} .moreLabels.mliSa(*@@@@@@3@@@@@@#intA;@@@A@@@@@:@A@$charB;@@A@@@@@>@A@&stringQ;@@ A@@@@@B@@@%bytesC;@@ A@@@@@F@@@%floatD;@@A@@@@@J@@@$boolE;@@%falsec@@T@$trued@@Z@@@A@@@@@[@A@$unitF;@@"()e@@e@@@A@@@@@f@A@ #exnG;@@@A@@@@@j@@@#effH;@@O@A@A@@@@@@s@@@,continuationI;@@Q@@P@B@A@nY@@@@@@@@@%arrayJ;@@R@A@A@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern @ @0Division_by_zero]#@@@A  @+End_of_file\#$@@@A@'FailureY#,@'@@A!$$@0Invalid_argumentX#5@0@@A*$-#-@-Match_failureV#>@@=@9@;@@a@@A;5>4>@)Not_foundZ#O@@@AC=F<F@-Out_of_memoryW#W@@@AKENDN@.Stack_overflow^#_@@@ASMVLV@.Sys_blocked_io_#g@@@A[U^T^@)Sys_error[#o@j@@Ad^g]g@:Undefined_recursive_modulea#x@@w@s@u@@h@@Auoxnx@:Continuation_already_takenb#@@@A}wv@&Stdlib@Ax'HashtblAc,3c,:@e@@Б  Hash tables and hash functions. Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see {!find}, {!find_opt}) is normally very fast, often faster than the equivalent lookup in {!Map}. The functors {!Make} and {!MakeSeeded} can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key. {b Warning} a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup. The polymorphic {!t} hash table is useful in simpler cases or in interactive environments. It uses the polymorphic {!hash} function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality [(=)]. See {{!examples} the examples section}. dAC{  @@@@@@3@@A= {b Unsynchronized accesses} }  }  @@@@@@'warning    @#-53    @@    @@@@@@    @.@%alert@  @  @5unsynchronized_access@  @  1@@@@@ ?Unsynchronized accesses to hash tables are a programming error.A 2 9A 2 x@@A 2 8A 2 y@@@@@@@@@@@  B z }@Y@'warningC ~ C ~ @#+53C ~ C ~ @@C ~  C ~ @@@@@@ C ~  C ~ @v@"! Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a {!Mutex.t}). E  I ` d@@@@@@327 {1 Generic interface} /L g i0L g @@@@@@A+!tB:O  ;O  @А!a@3A@@AAAAA@@;@@@@@B@A@@J@@K@@@L@GG@BB@@@`O  aO  @)ocaml.docs 6 The type of hash tables from type ['a] to type ['b]. pP  qP  @@@@@@@@@@@@AtO  uO  @@B@А!b@;O  O  @@ @;C @B@A'Hashtbl!tOC@C@@@@OO@BB@@@96@@&@@AгO  O  @O  D@E@А!afO  O  @@А!b mO  O  @@@-pO  U@@WTƐSR@RR@@@R@R@@)ba@&createcR  R  @б&randomг$boolR  ,R  0@@ @@@X3@\@A@@б@г#intS 4 CS 4 F@@ @@@Y@@г!tS 4 SS 4 T@А!a@cC@Z$S 4 KS 4 M@@А!b@eC@[0 S 4 OS 4 Q@@@! @@@^8S 4 J @@@. @@_<1#@@MF@@@` @@aD!R  ,@@ @$R  /@Ð y [Hashtbl.create n] creates a new, empty hash table, with initial size greater or equal to the suggested size [n]. For best results, [n] should be on the order of the expected number of elements that will be in the table. The table grows as needed, so [n] is just an initial guess. If [n] is very small or negative then it is disregarded and a small default size is used. The optional [~random] parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of [Hashtbl.create] or deterministic over all executions. A hash table that is created with [~random] set to [false] uses a fixed hash function ({!hash}) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down. A hash table that is created with [~random] set to [true] uses the seeded hash function {!seeded_hash} with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among [2^{30}] different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using {!fold} or {!iter} is no longer deterministic: elements are enumerated in different orders at different runs of the program. If no [~random] parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling {!randomize} or by setting the [R] flag in the [OCAMLRUNPARAM] environment variable. @before 4.00 the [~random] parameter was not present and all hash tables were created in non-randomized mode. 1T U W2x@@@@@@@JA@@?@E@@@@@@d%cleardHzIz@б@г!tSzTz@А!a@nC@f3[ZZ[[[[[@>@Aazbz@@А!b@pC@gmznz@@@# @@@juz"@@г*$unit}z~z@@ @@@k$@@@@@l'@@@z @' v Empty a hash table. Use [reset] instead of [clear] to shrink the size of the bucket table to its initial size. {|?u@@@@@@@B@@@7@@@@@@F%resete~w}~w@б@г}!t~w~w@А!a@yC@q3@e>@A~w~w@@А!b@{C@r~w~w@@@# @@@u~w"@@г$unit~w~w@@ @@@v$@@@@@w'@@@~wy @ i Empty a hash table and shrink the size of the bucket table to its initial size. @since 4.00 @@@@@@@C@@@ @@@@@@F$copyf  @б@г᠐!t   !@А!a@C@|3#""#####@e>@A) * @@А!b@C@}5 6 @@@# @@@= "@@г !tE .F /@А!a*%L &M (@@А!b#,S *T ,@@@7*@@@4[ %@@@' @@8"@@@a  @ ' Return a copy of the given hashtable. n02o0^@@@@@@@D@@,@@@@@@@W#addg`f`i@б@гV!t`u`v@А!a@C@3@v>@A`m`o@@А!b@C@`q`s@@@# @@@`l"@@б#keyА!a$`~`@@б$dataА!b )``@@г{$unit``@@ @@@8@@2@@;` @@%D@@?`z @@@2@@C-@@@`b@  [Hashtbl.add tbl ~key ~data] adds a binding of [key] to [data] in table [tbl]. {b Warning}: Previous bindings for [key] are not removed, but simply hidden. That is, after performing {!remove}[ tbl key], the previous binding for [key], if any, is restored. (Same behavior as with association lists.) If you desire the classic behavior of replacing elements, see {!replace}. 6@@@@@@@E@@#@@@@@@@b$findh8>8B@б@г֠!t8N8O@А!a@C@3@>@A8F8H@@А!b@C@*8J+8L@@@# @@@28E"@@б@А!a"98S:8U@@А!b#?8Y@8[@@@-@@( @@@@@+@@@I8: @萠 y [Hashtbl.find tbl x] returns the current binding of [x] in [tbl], or raises [Not_found] if no such binding exists. V\^W@@@@@@@oF@@@j@@@@@@J(find_optimn@б@г>!txy@А!a@C@3@i>@A@@А!b@C@@@@# @@@"@@б@А!a"@@г &option @А!b$-@@@*@@@4 @@@<@@7@@@)@@:$@@@@_ [Hashtbl.find_opt tbl x] returns the current binding of [x] in [tbl], or [None] if no such binding exists. @since 4.05  @@@@@@@G@@&@oᐠ@@@@@@Y(find_allj@б@г!t@А!a@C@3@x>@A@@А!b@C@  @@@# @@@"@@б@А!a"@@г$list!"@А!b$-()@@@*@@@4 @@@<@@7@@@)@@:$@@@7@֐ [Hashtbl.find_all tbl x] returns the list of all data associated with [x] in [tbl]. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table. DEd@@@@@@@]H@@&@X@@@@@@Y#memk[\@б@г,!tfg@А!a@C@3nmmnnnnn@x>@Atu@@А!b@C@@@@# @@@"@@б@А!a"@@гV$bool@@ @@@,@@@4@@/@@@!@@2 @@@@E 6 [Hashtbl.mem tbl x] checks if [x] is bound in [tbl]. @@@@@@@I@@@Uǐ@@@@@@Q&removel  @б@г!t " #@А!a@C@3@p>@A  @@А!b@C@   @@@# @@@ "@@б@А!a" ' )@@г$unit - 1@@ @@@,@@@4@@/@@@!@@2 @@@  @ [Hashtbl.remove tbl x] removes the current binding of [x] in [tbl], restoring the previous binding if it exists. It does nothing if [x] is not bound in [tbl]. "24#@@@@@@@;J@@@6@@@@@@Q'replacem9:@б@г !tDE@А!a@C@3LKKLLLLL@p>@ARS@@А!b@C@^_@@@# @@@f"@@б#keyА!a$op @@б$dataА!b )yz@@г/$unit@@ @@@8@@2@@;  @@%D@@? @@@2@@C-@@@@4 / [Hashtbl.replace tbl ~key ~data] replaces the current binding of [key] in [tbl] by a binding of [key] to [data]. If [key] is unbound in [tbl], a binding of [key] to [data] is added to [tbl]. This is functionally equivalent to {!remove}[ tbl key] followed by {!add}[ tbl key data]. )S@@@@@@@K@@#@D@@@@@@b$iternU[U_@б!fб#keyА!a@C@3@}:@AUiUk@@б$dataА!b@C@UtUv@@г$unitUzU~@@ @@@ @@@@#Uo @@1,@@'Ue @@б@гà!tUU@А!a=8UU@@А!b3? U U@@@J:@@@GU@@гȠ$unitUU@@ @@@U@@@@@X@@i6@@['Ub @@@*UW@ɐ f [Hashtbl.iter ~f tbl] applies [f] to all bindings in table [tbl]. [f] receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to [f]. The order in which the bindings are passed to [f] is unspecified. However, if the table contains several bindings for the same key, they are passed to [f] in reverse order of introduction, that is, the most recent binding is passed first. If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random. The behavior is not specified if the hash table is modified by [f] during the iteration. 78!"@@@@@@@PL@@@K@@@@@@{2filter_map_inplaceoN"" O""@б!fб#keyА!a@C@3]\\]]]]]@:@Ac""&d""(@@б$dataА!b@C@r""1s""3@@гڠ&option{"":|""@@А!b!""7""9@@@@@@( @@$@@+"",@@94@@/"""@@б@г`!t""N""O@А!aE@""F""H@@А!b;G""J""L@@@RB@@@O""E@@гe$unit"S"Y"S"]@@ @@@]@@@@@`@@q6@@c"" @@@""@f m [Hashtbl.filter_map_inplace ~f tbl] applies [f] to all bindings in table [tbl] and update each binding depending on the result of [f]. If [f] returns [None], the binding is discarded. If it returns [Some new_val], the binding is update to associate the key to [new_val]. Other comments for {!iter} apply as well. @since 4.03 "^"`##@@@@@@@M@@@v萠@@@@@@$foldp####@б!fб#keyА!a@ C@3@:@A ## ##@@б$dataА!b@ C@  ## ##@@б@А#acc@ C@  ## #$@@А#acc $ "#$ ##$ @@@@@ ) @@% @@ , *##@@:5@@ 0 .## @@б@г!t 8#$ 9#$@А!aFA ?#$ @#$@@А!b<H F#$ G#$@@@SC@@@ P N#$@@б$initА#acc@Y W#$! X#$%@@А#accF_ ]#$) ^#$-@@KK@@ d b#$@@@@@ h@@y=@@ k i## @@@ l##@  [Hashtbl.fold ~f tbl ~init] computes [(f kN dN ... (f k1 d1 init)...)], where [k1 ... kN] are the keys of all bindings in [tbl], and [d1 ... dN] are the associated values. Each binding is presented exactly once to [f]. The order in which the bindings are passed to [f] is unspecified. However, if the table contains several bindings for the same key, they are passed to [f] in reverse order of introduction, that is, the most recent binding is passed first. If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random. The behavior is not specified if the hash table is modified by [f] during the iteration.  y$.$0 z''@@@@@@@ N@@@ @@@@@@&lengthq '' ''@б@гa!t '' ''@А!a@ C@ 3        @>@A '' ''@@А!b@ C@  '' ''@@@# @@@  ''"@@г #int '' ''@@ @@@ $@@@@@ '@@@ '' @o [Hashtbl.length tbl] returns the number of bindings in [tbl]. It takes constant time. Multiple bindings are counted once each, so [Hashtbl.length] gives the number of times [Hashtbl.iter] calls its first argument.  '' ((@@@@@@@ O@@@ 񐠠@@@@@@F)randomizer (( ((@б@г $unit (( ((@@ @@@ 3        @_z8@A@@г $unit (( ((@@ @@@ @@@@@ @@@ (( @ X After a call to [Hashtbl.randomize()], hash tables are created in randomized mode by default: {!create} returns randomized hash tables, unless the [~random:false] optional parameter is given. The same effect can be achieved by setting the [R] parameter in the [OCAMLRUNPARAM] environment variable. It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in {!create} call [Hashtbl.randomize()] at initialization time before any domains are created. Note that once [Hashtbl.randomize()] was called, there is no way to revert to the non-randomized default behavior of {!create}. This is intentional. Non-randomized hash tables can still be created using [Hashtbl.create ~random:false]. @since 4.00  &(( ',7,K@@@@@@@ ?P@@@ :@@@@@@1-is_randomizeds =,M,S >,M,`@б@г $unit H,M,c I,M,g@@ @@@ 3 J I I J J J J J@J_8@A@@г $bool W,M,k X,M,o@@ @@@ @@@@@ !@@@ b,M,O @ } Return [true] if the tables are currently created in randomized mode by default, [false] otherwise. @since 4.03  o,p,r p,,@@@@@@@ Q@@@ @@@@@@1'rebuildt ,, ,-@б&randomг Q$bool ,-3 ,-7@@ @@@ "3        @La:@A@@б@гj!t -;-J -;-K@А!a@ /C@ # -;-B -;-D@@А!b@ 1C@ $# -;-F -;-H@@@! @@@ '+ -;-A @@г!t -;-X -;-Y@А!a(: -;-P -;-R@@А!b#A -;-T -;-V@@@5*@@@ *I -;-O@@@' @@ +M"@@^͠V@@@ , @@ -T ,-!@@ @ ,,$@  Return a copy of the given hashtable. Unlike {!copy}, {!rebuild}[ h] re-hashes all the (key, value) entries of the original table [h]. The returned hash table is randomized if [h] was randomized, or the optional [random] parameter is true, or if the default is to create randomized hash tables; see {!create} for more information. {!rebuild} can safely be used to import a hash table built by an old version of the {!Hashtbl} module, then marshaled to persistent storage. After unmarshaling, apply {!rebuild} to produce a hash table for the current version of the {!Hashtbl} module. @since 4.12  -Z-\ //@@@@@@@ R@@4@ @@@@@@tA+*statisticsuC 00 00$@@;@@,num_bindingsv@@ @@@ 3 "0>0B #0>0T@ Y Number of bindings present in the table. Same value as returned by {!length}.  00U0[ 100@@@@@@@ IT@+num_bucketsw@@ @@@ 6 <00 =00@ܐ ! Number of buckets in the table.  J00 K00@@@@@@@ cU@1max_bucket_lengthx@@ +@@@ 9 V01 W01@ ( Maximal number of bindings per bucket.  d11 e11L@@@@@@@ }V@0bucket_histogramy@@  I@@@ <@@@ > u1M1Q v1M1l@  Histogram of bucket sizes. This array [histo] has length [max_bucket_length + 1]. The value of [histo.(i)] is the number of buckets whose size is [i].  1m1s !12&@@@@@@@ W@@@A 'Hashtbl*statistics@@@ A@@@@ 00 "2'2*@ /- @since 4.00  /0 /0@@@@@@@@@ S@@# 0>0N@t@@Ш@г#int 0>0P 0>0S@@3        @1;@@@A@@@ P@ 2@@@@.+@@@A@@@@ 4@ ] ϐ@@@@@@# 00@@@Ш@г#int 00 00@@)@@@@ 7,@ z 쐠@@@@@@# 01@@@Ш@г#int 01 01@@F@@@@ :I@  @@@@@@# 1M1a@@@Ш@г%array 1M1g@г#int 1M1c 1M1f@@k@@@l@@@@ ?o@  /@@@@@@@Aг 200' 300.@ 600/ 7009@@@@@  J@@@@@@@3 B A A B B B B B@@A@%statsz O$2,22 P$2,27@б@г !t Z$2,2C [$2,2D@А!a@ lD@ d3 b a a b b b b b@VP@A h$2,2; i$2,2=@@А!b@ nD@ e t$2,2? u$2,2A@@@# @@@ h |$2,2:"@@гo*statistics $2,2H $2,2R@@ @@@ i$@@@@@ j'@@@ $2,2. @ . [Hashtbl.stats tbl] returns statistics about the table [tbl]: number of buckets, size of the biggest bucket, distribution of buckets by size. @since 4.00  %2S2U (23@@@@@@@ X@@@ > @@@@@@F  ? {1 Hash tables and Sequences}  *33 *33,@@@@@@3        @Xs1@A&to_seq ,3.34 ,3.3:@б@г !t ,3.3E ,3.3F@А!a@ D@ o  ,3.3> ,3.3@@@А!b@ D@ p, ,3.3A ,3.3C@@@! @@@ s4 ,3.3= @@г #Seq!t ,3.3T ,3.3W@  ,3.3X ,3.3Y@@В@А!a5P ,3.3K ,3.3M@@@А!b1X ,3.3P ,3.3R@@@@D@:@@ a@@@, @@@ f #,3.3J"@@@;@@ j6%@@@ ),3.30(@ Ȑ  Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first. The behavior is not specified if the hash table is modified during the iteration. @since 4.07  6-3Z3\ 7544@@@@@@@ OY@@8@  J@@@@@@+to_seq_keys M744 N744@б@г !t X745 Y745 @А!a@ D@ 3 ` _ _ ` ` ` ` `@>@A f745 g745@@@@@   m745 n745@@@ @@@  u745@@г #Seq!t 745 745@  745 745@@А!a.) 745  745@@@4@@@ 0@@@'@@ 3"@@@ 744@ 8 4 Same as [Seq.map fst (to_seq m)] @since 4.07  855 95=5Q@@@@@@@ Z@@$@ H @@@@@@R-to_seq_values ;5S5Y ;5S5f@б@г !t ;5S5p ;5S5q@@@@ 3        @l9@A ;5S5j ;5S5k@@А!b@ D@  ;5S5l ;5S5n@@@ @@@  ;5S5i@@г v#Seq!t ;5S5x ;5S5{@  ;5S5| ;5S5}@@А!b%. ;5S5u ;5S5w@@@+@@@ 5@@@'@@ 8"@@@ ;5S5U@ 4 Same as [Seq.map snd (to_seq m)] @since 4.07 <5~5=55@@@@@@@/[@@$@ *@@@@@@W'add_seq-?55.?55@б@г !t8?559?55@А!a@ D@ 3@??@@@@@@v>@AF?55G?55@@А!b@ D@ R?55S?55@@@# @@@ Z?55"@@б@г #Seq!th?55i?55@ l?55m?55@@В@А!a94x?55y?55@@@А!b3<?55?55@@@@H@<@@ E@@@, @@@ J?55"@@гC$unit?55?55@@ @@@ X@@@@@ [@@@M@@ ^H @@@?55@ C E Add the given bindings to the table, using {!add} @since 4.07 @55A6(6<@@@@@@@\@@@ SŐ@@@@@@}+replace_seqC6>6DC6>6O@б@г !tC6>6ZC6>6[@А!a@ D@ 3@>@AC6>6SC6>6U@@А!b@ D@ C6>6VC6>6X@@@# @@@ C6>6R"@@б@г #Seq!tC6>6iC6>6l@ C6>6mC6>6n@@В@А!a94C6>6`C6>6b@@@А!b3<C6>6eC6>6g@@@@H@<@@ E@@@, @@@ J)C6>6_"@@гޠ$unit1C6>6r2C6>6v@@ @@@ X@@@@@ [@@@M@@ ^H @@@?C6>6@@ ސ I Add the given bindings to the table, using {!replace} @since 4.07 LD6w6yME66@@@@@@@e]@@@ `@@@@@@}&of_seqcG66dG66@б@г #Seq!trG66sG66@ vG66wG66@@В@А!a@ D@ 3@K@AG66G66@@@А!b@ D@ G66G66@@@@@@@ @@@8 @@@ G66.@@г r!tG66G66@А!a1,G66G66@@А!b)3G66G66@@@>0@@@ ;G66@@@& @@ ?"@@@G66@ g  Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using {!replace_seq}, which means that if two pairs have the same key, only the latest one will appear in the table. @since 4.07 H66L78@@@@@@@^@@,@ w鐠@@@@@@^: {1 Functorial interface} N88N88'@@@@@@3@p1@A   The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins. For instance, one might want to specialize a table for integer keys: {[ module IntHash = struct type t = int let equal i j = i=j let hash i = i land max_int end module IntHashtbl = Hashtbl.Make(IntHash) let h = IntHashtbl.create 17 in IntHashtbl.add h 12 "hello" ]} This creates a new module [IntHashtbl], with a new type ['a IntHashtbl.t] of tables from [int] to ['a]. In this example, [h] contains [string] values so its type is [string IntHashtbl.t]. Note that the new type ['a IntHashtbl.t] is not compatible with the type [('a,'b) Hashtbl.t] of the generic interface. For example, [Hashtbl.length h] would not type-check, you must use [IntHashtbl.length]. P8)8+k<1<5@@@@@@*HashedTypeEm<7 compare x y = 0)], {!hash}) for comparing objects by structure and handling {!Stdlib.nan} correctly - ([(==)], {!hash}) for comparing objects by physical equality (e.g. for mutable or cyclic objects). v= =??@@@@@@@a@@@xꐠ@@@@@@1@A@k@K$@@3@8M&@A 3@@An @A@@гB!t@=@Z@=@[@А!a@ H@ @=@W@=@Y@@@ @@@ @@@"@@ %@@@@=@C@@e@@@@%%clearǠ@\@f@\@k@б@гp!t@\@q@\@r@А!a@ H@ 3@DY%@A@\@n@\@p@@@ @@@  @@гz$unit@\@v@\@z@@ @@@ @@@@@ @@@@\@b @@f@@ @@%resetȠ@{@@{@@б@г!t@{@@{@@А!a@ H@ 3@>Y%@A@{@@{@@@@ @@@  @@г$unit @{@ @{@@@ @@@ @@@@@ @@@@{@ @- @since 4.00 "@{@#@{@@@@@@@@;g@@@6@@@@@@8$copyɠ9@@:@@@б@г!tD@@E@@@А!a@ H@ 3LKKLLLLL@Wr>@AR@@S@@@@@ @@@  @@г!t`@@a@@@А!ag@@h@@@@@"@@@  @@@@@ !@@@s@@@@h@@@@'#addʠ~@@@@@б@гH!t@@@@@А!a@ H@ 3@Fa%@A@@@@@@@ @@@  @@б#keyг#key@@@@@@ @@@ @@б$dataА!a'"@@@@@@гm$unit@@@@@@ @@@ 1@@9@@ 4@@ @@,!@@ 8@@ @@@7@@ <:@@@@@@@i@@@@B&removeˠ@A @A@б@г!t@A@A@А!a@ H@ 3@a|%@A@A@A@@@ @@@  @@б@г렐#key@A@A@@ @@@ @@г$unit@A!@A%@@ @@@ %@@@@@ (@@@&@@ +) @@@"@A@@:j@@@@1$find̠-A&A0.A&A4@б@г!t8A&A:9A&A;@А!a@ !H@ 3@??@@@@@@Pk%@AFA&A7GA&A9@@@ @@@  @@б@г:#keyVA&A?WA&AB@@ @@@ @@А!a!`A&AFaA&AH@@@ &@@ !@@@@@ $"@@@jA&A, @@k@@ @@*(find_opt͠uAIASvAIA[@б@г?!tAIAaAIAb@А!a@ +H@ "3@Id%@AAIA^AIA`@@@ @@@ $ @@б@г#keyAIAfAIAi@@ @@@ %@@г &optionAIApAIAv@А!a+&AIAmAIAo@@@1@@@ '- @@@@@ (0@@@.@@ )31@@@AIAO@`- @since 4.05 AwA}AwA@@@@@@@l@@&@p␠@@@@@@R(find_allΠAAAA@б@г!tAAAA@А!a@ 5H@ ,3@q>@AAAAA@@@ @@@ . @@б@г#keyAAAA@@ @@@ /@@г$listAAAA@А!a+&"AA#AA@@@1@@@ 1- @@@@@ 20@@@.@@ 331@@@1AA@@Im@@@@9'replaceϠ<AA=AA@б@г!tGAAHAA@А!a@ ?H@ 63ONNOOOOO@Xs%@AUAAVAA@@@ @@@ 8 @@б#keyгK#keygAAhAA@@ @@@ 9@@б$dataА!a'"uAAvAA@@г+$unit~AAAA@@ @@@ :1@@9@@ ;4AA @@,!@@ <8AA @@@7@@ =<:@@@AA@@n@@@@B#memРAAAB@б@гf!tABAB@А!a@ HH@ @3@a|%@AABAB@@@ @@@ B @@б@г#keyAB AB@@ @@@ C@@г$boolABAB@@ @@@ D%@@@@@ E(@@@&@@ F+) @@@AA@@o@@@@1$iterѠBB"BB&@б!fб#keyгࠐ#keyBB0BB3@@ @@@ I3@Pk%@A@@б$dataА!a@ TH@ JBB<BB>@@гǠ$unitBBBBBF@@ @@@ K@@@@ L!#BB7 @@3(@@ M%'BB, @@б@г!t1BBN2BBO@А!a,68BBK9BBM@@@2@@@ O= @@г$unitFBBSGBBW@@ @@@ PJ@@@@@ QM@@b-@@ RPRBB) @@@UBB@@mp@@@@W2filter_map_inplaceҠ`BXBbaBXBt@б!fб#keyгU#keyqBXB}rBXB@@ @@@ U3srrsssss@v%@A@@б$dataА!a@ aH@ VBXBBXB@@г&optionBXBBXB@А!aBXBBXB@@@@@@ X& @@$@@ Y)BXB@@;0@@ Z-BXBy@@б@гm!tBXBBXB@А!a4>BXBBXB@@@:@@@ \E @@гp$unitBBBB@@ @@@ ]R@@@@@ ^U@@j-@@ _XBXBv @@@BXB^@q- @since 4.03 BBBB@@@@@@@q@@@󐠠@@@@@@x$foldӠBBBB@б!fб#keyг렐#keyBBBB@@ @@@ b3      @>@A@@б$dataА!a@ nH@ cBBBB@@б@А#acc@ pH@ d)BB*BC@@А#acc "/BC0BC @@@@@ e' @@% @@ f*7BB@@<1@@ g.;BB @@б@г!tEBCFBC@А!a5?LBCMBC@@@;@@@ iF @@б$initА#acc7N[BC\BC @@А#acc=TaBC$bBC(@@BB@@ jYfBC@@@@@ k]@@r4@@ l`mBB @@@pBB@@r@@@@g&lengthԠ{C)C3|C)C9@б@гE!tC)C?C)C@@А!a@ wH@ q3@%@AC)C<C)C>@@@ @@@ s @@гu#intC)CDC)CG@@ @@@ t@@@@@ u@@@C)C/ @@s@@ @@%statsՠCHCRCHCW@б@г!tCHC\CHC]@А!a@ ~H@ x3@>Y%@ACHCYCHC[@@@ @@@ z @@г ʠ*statisticsCHCaCHCk@@ @@@ {@@@@@ |@@@CHCN @- @since 4.00 CHClCHC~@@@@@@@t@@@ @@@@@@8&to_seq֠CCCC@б@гؠ!tCCCC@А!a@ H@ 3!  !!!!!@Wr>@A'CC(CC@@@ @@@  @@г#Seq!t9CC:CC@ =CC>CC@@В@г0#keyLCCMCC@@ @@@ -@@@А!a83XCCYCC@@@@@A@@ <@@@3 @@@ AfCC)@@@@@@ EC,@@@lCC/@ - @since 4.07 yCCzCC@@@@@@@u@@?@@@@@@@d+to_seq_keysנCCCC@б@гZ!tCCCC@@@@ 3@~9@ACCCC@@@ @@@  @@г;#Seq!tCCCC@ CCCC@@г#keyCCCC@@ @@@ )@@@ @@@ . @@@,@@ 1/@@@CC@t- @since 4.07 CCCD@@@@@@@v@@+@@@@@@@P-to_seq_valuesؠD DD D @б@гà!tD D&D D'@А!a@ H@ 3        @o>@AD D#D D%@@@ @@@  @@г#Seq!t$D D.%D D1@ (D D2)D D3@@А!a% 0D D+1D D-@@@+@@@ '@@@%@@ *(@@@<D D@ې- @since 4.07 ID4D:JD4DL@@@@@@@bw@@$@]@@@@@@I'add_seq٠`DNDXaDND_@б@г*!tkDNDelDNDf@А!a@ H@ 3srrsssss@h>@AyDNDbzDNDd@@@ @@@  @@б@г#Seq!tDNDuDNDx@ DNDyDNDz@@В@г#keyDNDkDNDn@@ @@@ /@@@А!a:5DNDqDNDs@@@@@C@@ >@@@3 @@@ CDNDj)@@гo$unitDND~DND@@ @@@ Q@@@@@ T@@@R@@ WU @@@DNDT@o- @since 4.07 DDDD@@@@@@@x@@@񐠠@@@@@@v+replace_seqڠDDDD@б@г!tDDDD@А!a@ H@ 3@>@A DDDD@@@ @@@  @@б@г#Seq!t!DD"DD@ %DD&DD@@В@г#key4DD5DD@@ @@@ /@@@А!a:5@DDADD@@@@@C@@ >@@@3 @@@ CNDD)@@г$unitVDDWDD@@ @@@ Q@@@@@ T@@@R@@ WU @@@dDD@- @since 4.07 qDDrDD@@@@@@@y@@@@@@@@@v&of_seq۠DDDE@б@г#Seq!tDEDE@ DEDE@@В@г#keyDEDE@@ @@@ 3@O@A@@@А!a@ H@  DE DE @@@@@@@ @@@: @@@ DE0@@г!tDEDE@А!a"*DEDE@@@(@@@ 1 @@@@@ 4@@@DD@- @since 4.07 EE"EE4@@@@@@@ z@@#@@@@@@@S@A@A@o@h4@-@@?@8@@W@7@@>@7@P@0@y@r>@@W@7@`@@@N@@3/../////@P@A3321122222@ @A7@@8E5E<@@I . The output signature of the functor {!Make}. FE=E?GE=Er@@@@@@@I@@@3GFFGGGGG@ (@A@$MakeCIVEtEWEtE@o@@Т!HJbEtEcEtE@Р [*HashedTypekEtElEtE@3kjjkkkkk@ M h ] WA@ : A@ @@j@J@@c@\@@Z@S@@<@5@%@@@/@@c@C@?@@@Aih@hh@@@h@h@e @ACB@@УР !SEtEEtE@3@N`@Y@^|@c@A  @@ #keyEEEE@+ @;@@@Aw!t@@@ @@@@EEEE@@@@}@@@Aг !HEEEE@EE@@@/@@@ !tEEEE@+ А!a@3K@1FEEEE@@BA@; @A@A'Hashtbl$Make!tK@/@@@1O@B@@@EEEE@@@@1~@@@Aг'EE(EE@+EE,EE@@!H2EE3EE@5EE@&8EE @!@А!a+?EE@EE@@@9)@@+@@ -+K;@@@Ayx@@@@@@@w@@@tA@ ,K;W@A@ALKJIH@@@GF@@E@@@BA@ -@ @@@ @@@@@ @ @ @ .@  @@@  @@@ @@ @ @ @ /@ @@@  ~@@@@@@ p n `@ Q0@% C@@@) G@@@@@@ @ @ 1@3 @@@\@@@ @@@@@@@@@@@@2@H@@@@@@@@@@@@@@@@@3@Z@@@@'@@@@@@@@_@]@Y4@iK@@@@6@@@3T@@@@@@@@ @5@|@@@@I@@@֠@@@@@@@@@@6@@@@\@@@@@@@@@@@@@r@p@l7@^@@@@p@@@F@@@@@@@@5@3@/8+)~@@@@@@@@@@@@@@@@@@@@@@@@9@@@@@@@@@@@۠@@@@@@@@@@@vtf@W:SQ@@@C>@33@@@@@@@E@@@ ;;@@@@@@@@@;@@@@@@@@@@@@<@ @@@@@@@@@@p=@b@@@TS@@@@@q@@@@@@@@&$@>@2@@@+@@@@@@@@@@?@E@@@>@@@@@@ywi@Z@@UL@@@@P>=@+@@@@]@@@@@@@@@@@@@@A@s@@@@nǠ@I@@@@@@@@@@@@@@@@@}@nB@ji@a@@@@M@@@@@Q@@@@@@$"@@OS@@3      @@AEtE@@ [ Functor building an implementation of the hashtable structure. The functor [Hashtbl.Make] returns a structure containing a type [key] of keys and a type ['a t] of hash tables associating data of type ['a] to keys of type [key]. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument [H] instead of generic equality and hashing. Since the hash function is not seeded, the [create] operation of the result structure always returns non-randomized hash tables. EEH$HH@@@@@@@EtEx@@0SeededHashedTypeGM)HJHX*HJHh@BC@БA+!tDL9HsH~:HsH@@;@@A@@@@@=HsHy@ܐ ! The type of the hashtable keys. JHHKHH@@@@@@@@@c@@@@A@]@@@@@@@3UTTUUUUU@ @A@A@@@@@@@@@@@ut@ed@NM@65@! @@  @@@@@@@-~@~~@@@~@~@{A@A]`@%equalEHHHH@б@гt!tHHHH@@ @@@3@[y@A@@б@г!tHHHH@@ @@@@@г$boolHHHH@@ @@@@@@@@!@@@'@@$* @@@HH@x . The equality predicate used to compare keys. HHHI@@@@@@@A@@@@@@@@@C+seeded_hashFI II I@б@г۠#intI I  I I#@@ @@@3        @\q8@A@@б@гࠐ!tI I'I I(@@ @@@@@г#int&I I,'I I/@@ @@@@@@@@!@@@'@@$* @@@4I I@Ӑ B A seeded hashing function on keys. The first argument is the seed. It must be the case that if [equal x y] is true, then [seeded_hash seed x = seeded_hash seed y] for any value of [seed]. A suitable choice for [seeded_hash] is the function {!Hashtbl.seeded_hash} below. AI0I8BJSJ@@@@@@@ZB@@@U@@@@@@C@A@}@]$@@3SRRSSSSS@J_&@A 3VUUVVVVV@@A[HkHo\JJ@@m E The input signature of the functor {!MakeSeeded}. @since 4.00 jJJkJJ@@@@@@@mHJHL@3kjjkkkkk@@A@'SeededS`PxJJyJJ@\@БA+#keyHNJKJK@@;@@A@@@@@JJ@@@@D@@@A@@@3@7k`ZA@@g@@7;:@::@@@:@:@7x@A@A+!tIOKKKK@А!a@3@+60;@@@A@A@G@B@@@KK @@@@E@@AKKKK@@Q@;@ADA@O@B@@@ @@@@@A@ @@3@@A @&createJKK KK&@б&randomг$boolKKVKKZ@@ @@@ 3@0@"@A@@б@гƠ#intK^KqK^Kt@@ @@@!@@гS!tK^K{K^K|@А!a@)P@"$ K^Kx K^Kz@@@ @@@$+@@@ @@%.#@@?7@@@& @@'5KK)@@ @ KK @@8F@@"@@<%clearK+K}K,K}K@б@г!t6K}K7K}K@А!a@0P@*3>==>>>>>@[r%@ADK}KEK}K@@@ @@@, @@г$unitRK}KSK}K@@ @@@-@@@@@.@@@]K}K @@uG@@ @@%resetLhKKiKK@б@гƠ!tsKKtKK@А!a@7P@13{zz{{{{{@>Y%@AKKKK@@@ @@@3 @@г<$unitKKKK@@ @@@4@@@@@5@@@KK @@H@@ @@$copyMKKKK@б@г!tKKKK@А!a@?P@83@>Y%@AKKKK@@@ @@@: @@г!tKKKK@А!aKKKK@@@"@@@< @@@@@=!@@@KK@@I@@@@'#addNKKKK@б@гH!tKKKK@А!a@IP@@3@Fa%@A KK KK@@@ @@@B @@б#keyг#key KK KK@@ @@@C@@б$dataА!a'" #KL $KL@@г٠$unit ,KL -KL @@ @@@D1@@9@@E4 5KK @@,!@@F8 9KK @@@7@@G<:@@@ ?KK@@ WJ@@@@B&removeO JL L KL L@б@г!t UL L" VL L#@А!a@RP@J3 ] \ \ ] ] ] ] ]@a|%@A cL L dL L!@@@ @@@L @@б@г렐#key sL L' tL L*@@ @@@M@@г -$unit L L. L L2@@ @@@N%@@@@@O(@@@&@@P+) @@@ L L@@ K@@@@1$findP L3L= L3LA@б@г!t L3LG L3LH@А!a@ZP@S3        @Pk%@A L3LD L3LF@@@ @@@U @@б@г:#key L3LL L3LO@@ @@@V@@А!a! L3LS L3LU@@@ &@@W!@@@@@X$"@@@ L3L9 @@ L@@ @@*(find_optQ LVL` LVLh@б@г?!t LVLn LVLo@А!a@dP@[3        @Id%@A LVLk LVLm@@@ @@@] @@б@г#key! LVLs! LVLv@@ @@@^@@г v&option!LVL}!LVL@А!a+&!LVLz!LVL|@@@1@@@`- @@@@@a0@@@.@@b31@@@!-LVL\@̐- @since 4.05 !:LVL!;LVL@@@@@@@!SM@@&@!N@@@@@@R(find_allR!QLL!RLL@б@г!t!\LL!]LL@А!a@nP@e3!d!c!c!d!d!d!d!d@q>@A!jLL!kLL@@@ @@@g @@б@г#key!zLL!{LL@@ @@@h@@г!$list!LL!LL@А!a+&!LL!LL@@@1@@@j- @@@@@k0@@@.@@l31@@@!LL@@!N@@@@9'replaceS!LL!LL@б@г!t!LL!LL@А!a@xP@o3!!!!!!!!@Xs%@A!LL!LL@@@ @@@q @@б#keyгK#key!LL!LL@@ @@@r@@б$dataА!a'"!LL!LL@@г!$unit!LL!LL@@ @@@s1@@9@@t4!LL @@,!@@u8!LL @@@7@@v<:@@@!LL@@"O@@@@B#memT"LM" LM@б@гf!t"LM"LM@А!a@P@y3""""""""@a|%@A"!LM ""LM @@@ @@@{ @@б@г#key"1LM"2LM@@ @@@|@@г!$bool">LM"?LM@@ @@@}%@@@@@~(@@@&@@+) @@@"LLM@@"dP@@@@1$iterU"WMM)"XMM-@б!fб#keyгࠐ#key"hMM7"iMM:@@ @@@3"j"i"i"j"j"j"j"j@Pk%@A@@б$dataА!a@P@"}MMC"~MME@@г"3$unit"MMI"MMM@@ @@@@@@@!"MM> @@3(@@%"MM3 @@б@г!t"MMU"MMV@А!a,6"MMR"MMT@@@2@@@= @@г"_$unit"MMZ"MM^@@ @@@J@@@@@M@@b-@@P"MM0 @@@"MM%@@"Q@@@@W2filter_map_inplaceV"M_Mi"M_M{@б!fб#keyгU#key"M_M"M_M@@ @@@3""""""""@v%@A@@б$dataА!a@P@"M_M"M_M@@г"Z&option"M_M"M_M@А!a#M_M#M_M@@@@@@& @@$@@)# M_M@@;0@@-#M_M@@б@гm!t#M_M#M_M@А!a4>#!M_M#"M_M@@@:@@@E @@г"ܠ$unit#/MM#0MM@@ @@@R@@@@@U@@j-@@X#;M_M} @@@#>M_Me@ ݐ- @since 4.03 #KMM#LMM@@@@@@@#dR@@@ #_@@@@@@x$foldW#bMM#cMM@б!fб#keyг렐#key#sMM#tMM@@ @@@3#u#t#t#u#u#u#u#u@>@A@@б$dataА!a@P@#MM#MN@@б@А#acc@P@#MN#MN @@А#acc "#MN #MN@@@@@' @@% @@*#MM@@<1@@.#MM @@б@г!t#MN#MN@А!a5?#MN#MN@@@;@@@F @@б$initА#acc7N#MN##MN'@@А#acc=T#MN+#MN/@@BB@@Y#MN@@@@@]@@r4@@`#MM @@@#MM@@#S@@@@g&lengthX#N0N:#N0N@@б@гE!t#N0NF#N0NG@А!a@P@3########@%@A$N0NC$N0NE@@@ @@@ @@г#᠐#int$N0NK$N0NN@@ @@@@@@@@@@@$N0N6 @@$1T@@ @@%statsY$$NONY$%NON^@б@г!t$/NONc$0NONd@А!a@P@3$7$6$6$7$7$7$7$7@>Y%@A$=NON`$>NONb@@@ @@@ @@г6*statistics$KNONh$LNONr@@ @@@@@@@@@@@$VNONU @@$nU@@ @@&to_seqZ$aNtN~$bNtN@б@г!t$lNtN$mNtN@А!a@P@3$t$s$s$t$t$t$t$t@>Y%@A$zNtN${NtN@@@ @@@ @@г##Seq!t$NtN$NtN@ $NtN$NtN@@В@г#key$NtN$NtN@@ @@@-@@@А!a83$NtN$NtN@@@@@A@@<@@@3 @@@A$NtN)@@@@@@EC,@@@$NtNz/@"^- @since 4.07 $NN$NN@@@@@@@$V@@?@"n$@@@@@@d+to_seq_keys[$NN$NN@б@гA!t$NN$NN@@@@3$$$$$$$$@~9@A$NN$NN@@@ @@@ @@г##Seq!t% NN% NN@ % NN%NN@@г#key%NN%NN@@ @@@)@@@ @@@. @@@,@@1/@@@%(NN@"ǐ- @since 4.07 %5NN%6NN@@@@@@@%NW@@+@"%I@@@@@@P-to_seq_values\%LNO%MNO@б@г!t%WNO%XNO@А!a@P@3%_%^%^%_%_%_%_%_@o>@A%eNO%fNO@@@ @@@ @@г##Seq!t%wNO"%xNO%@ %{NO&%|NO'@@А!a% %NO%NO!@@@+@@@'@@@%@@*(@@@%NO@#.- @since 4.07 %O(O.%O(O@@@@@@@@%X@@$@#>%@@@@@@I'add_seq]%OBOL%OBOS@б@г!t%OBOY%OBOZ@А!a@P@3%%%%%%%%@h>@A%OBOV%OBOX@@@ @@@ @@б@г$e#Seq!t%OBOi%OBOl@ %OBOm%OBOn@@В@гk#key%OBO_%OBOb@@ @@@/@@@А!a:5%OBOe&OBOg@@@@@C@@>@@@3 @@@C& OBO^)@@г% $unit&OBOr&OBOv@@ @@@Q@@@@@T@@@R@@WU @@@&#OBOH@#- @since 4.07 &0OwO}&1OwO@@@@@@@&IY@@@#&D@@@@@@v+replace_seq^&GOO&HOO@б@г!t&ROO&SOO@А!a@P@3&Z&Y&Y&Z&Z&Z&Z&Z@>@A&`OO&aOO@@@ @@@ @@б@г$#Seq!t&tOO&uOO@ &xOO&yOO@@В@г#key&OO&OO@@ @@@/@@@А!a:5&OO&OO@@@@@C@@>@@@3 @@@C&OO)@@г&V$unit&OO&OO@@ @@@Q@@@@@T@@@R@@WU @@@&OO@$V- @since 4.07 &OO&OO@@@@@@@&Z@@@$f&ؐ@@@@@@v&of_seq_&OO&OO@б@г%o#Seq!t&OP&OP@ &OP&OP@@В@гu#key&OO&OO@@ @@@3&&&&&&&&@O@A@@@А!a@P@ 'OO'OP@@@@@@@@@@: @@@'OO0@@гy!t'&OP''OP@А!a"*'-OP '.OP @@@(@@@1 @@@@@4@@@'9OO@$ؐ- @since 4.07 'FPP'GPP(@@@@@@@'_[@@#@$'Z@@@@@@S@A@A@=@6@@@}&@@@>@@r@k%@@7@@`@Y%@@W@7@`@@@N@@3''''''''@P@A33''''''''@@A'JJ'P)P0@@%*' F The output signature of the functor {!MakeSeeded}. @since 4.00 'P1P3'PjP~@@@@@@@'JJ@3''''''''@ @A@*MakeSeededQ'PP'PP@'`@@Т!HaR'PP'PP@Р 0SeededHashedType'PP'PP@3''''''''@ 4 O D >A@ ! A@@s@l8@1@@J@C@@A@:@@#@@ @@@/@@c@C@?@@@%ih@hh@@@h@h@e @ACB@@УР 'SeededS( PP( PP@3( ( ( ( ( ( ( ( @N`@Y@^()]@c@A  @@ #key(PP(PP@+ @;@@@Aw!t@@@@@@@(*PP(+PP@@@@(C^@@@Aг !H(6PP(7PP@(:PP@@@/@@@ !t(DPP(EPP@+ А!a@S@oF(TPP(UPP@@ S@; @A@A&'Hashtbl*MakeSeeded!tS@@@@O@B@@@(jPP(kPP@@@@(_@@@Aг(yPP(zPP@(}PP(~PP@@!H(PP(PP@(PP@&(PP @!@А!a+(PP(PP@@@9)@@+@@ S;@@@Axw@@@k@@@@v@@@sA@ S;V@A@A'8LKJIH@@@jGF@@E@@@BA@  % @@@i@@@h@ @@@g" @@@f@@e@@d@ @ @ @  @@@c @@@b@@a@ v@ t@ p@ b@@@` T@@@_@@^@ F@ D@ @@% 2@@@]) 6@@@\@@[@ @ @ @3@@@Ze@@@Y @@@X@@W@@V@@U@@@@H@@@T@@@@S@@@R@@Q@@P@@@@Zs@@@O@'@@@Ny@@M@@L@N@L@H@i:@@@K@6@@@J"C@@@I@@H@@G@ @@|@@@F@I@@@EŠ@@@D@@C@@B@@@@@@@A\@@@@w@@@?@@>@@=@@<@a@_@[@M@@@;@p@@@:5@@@9@@8@@7@$@"@~@@@6 @@@5@@4@@3@ @@@2@@@1@@0@@/@@@@@@.@@@-@@,@@+@۠@@@*w@@@)@@(@@'@ecU@FB@@@@&2-@""@@%@@$@@#@4@@@"**@@!@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@~@|@x@j@@@(m\[@@@@@y@@@@@@@@.,@@2@@@(@@@@@@@@@@@E@@@(@@@@@ @q@b@UT@@@ @(FE@+@@@ @e@@ @@@ @@@@@@@@  @@s@@@@(Ϡ@I@@@@@@@@@@@@@@@@@@v@(rq@a@@@@U@@@@@Y@@@@@@,*@@W[@@3*d*c*c*d*d*d*d*d@@A*iPP@@(*z  Functor building an implementation of the hashtable structure. The functor [Hashtbl.MakeSeeded] returns a structure containing a type [key] of keys and a type ['a t] of hash tables associating data of type ['a] to keys of type [key]. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument [H] instead of generic equality and hashing. The [create] operation of the result structure supports the [~random] optional parameter and returns randomized hash tables if [~random:true] is passed or if randomization is globally on (see {!Hashtbl.randomize}). @since 4.00 *wPQ*xSS@@@@@@@*zPP@@** $ {1 The polymorphic hash functions} *SS*ST @@@@@@3********@@ڑA@A@@@@@@@@@rq@a`@ON@?>@('@@@@@@@@@wv@@(bYX@XX@@@X@X@U#@AD$hashȠ*T T*T T@б@А!a@pT@lU*T T*T T@@г*#int*T T *T T#@@ @@@md@@@@@ng@@@*T T @( [Hashtbl.hash x] associates a nonnegative integer to any value of any type. It is guaranteed that if [x = y] or [Stdlib.compare x y = 0], then [hash x = hash y]. Moreover, [hash] always terminates, even on cyclic structures. +T$T&+TU@@@@@@@+a@@@(+@@@@@@+seeded_hashɠ+UU$+UU/@б@г*#int+&UU2+'UU5@@ @@@q3+(+'+'+(+(+(+(+(@[8@A@@б@А!a@wT@r +9UU9+:UU;@@г+#int+BUU?+CUUB@@ @@@s@@@@@t@@@%@@u"( @@@+PUU @( ^ A variant of {!hash} that is further parameterized by an integer seed. @since 4.00 +] UCUE+^"UU@@@@@@@+vb@@@(+q@@@@@@A*hash_paramʠ+t$UU+u$UU@б@г+R#int+$UU+$UU@@ @@@x3++++++++@Zo8@A@@б@г+c#int+$UU+$UU@@ @@@y@@б@А!a@T@z+$UU+$UU@@г+}#int+$UU+$UU@@ @@@{+@@@@@|.@@@#@@}1& @@@7@@~4:@@@+$UU@)Z F [Hashtbl.hash_param meaningful total x] computes a hash value for [x], with the same properties as for [hash]. The two extra integer parameters [meaningful] and [total] give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure [x], stopping after [meaningful] meaningful nodes were encountered, or [total] nodes (meaningful or not) were encountered. If [total] as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of [meaningful] and [total] means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters [meaningful] and [total] govern the tradeoff between accuracy and speed. As default choices, {!hash} and {!seeded_hash} take [meaningful = 10] and [total = 100]. +%UU+5YZ"@@@@@@@+c@@!@)j+ܐ@@@@@@S1seeded_hash_paramˠ+7Z$Z*+7Z$Z;@б@г+#int+7Z$Z>+7Z$ZA@@ @@@3++++++++@l8@A@@б@г+Π#int+7Z$ZE+7Z$ZH@@ @@@@@б@г+ݠ#int, 7Z$ZL, 7Z$ZO@@ @@@ @@б@А!a@T@+,7Z$ZS,7Z$ZU@@г+#int,$7Z$ZY,%7Z$Z\@@ @@@:@@@@@=@@@#@@@& @@@5@@C8@@@I@@FL@@@,87Z$Z&@)א A variant of {!hash_param} that is further parameterized by an integer seed. Usage: [Hashtbl.seeded_hash_param meaningful total seed x]. @since 4.00 ,E8Z]Z_,F;Z[ @@@@@@@,^d@@$@),Y@@@@@@e,g,f v {1:examples Examples} {2 Basic Example} {[ (* 0...99 *) let seq = Seq.ints 0 |> Seq.take 100 (* build from Seq.t *) # let tbl = seq |> Seq.map (fun x -> x, string_of_int x) |> Hashtbl.of_seq val tbl : (int, string) Hashtbl.t = # Hashtbl.length tbl - : int = 100 # Hashtbl.find_opt tbl 32 - : string option = Some "32" # Hashtbl.find_opt tbl 166 - : string option = None # Hashtbl.replace tbl 166 "one six six" - : unit = () # Hashtbl.find_opt tbl 166 - : string option = Some "one six six" # Hashtbl.length tbl - : int = 101 ]} {2 Counting Elements} Given a sequence of elements (here, a {!Seq.t}), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences. Here we illustrate that principle using a sequence of (ascii) characters (type [char]). We use a custom [Char_tbl] specialized for [char]. {[ # module Char_tbl = Hashtbl.Make(struct type t = char let equal = Char.equal let hash = Hashtbl.hash end) (* count distinct occurrences of chars in [seq] *) # let count_chars (seq : char Seq.t) : _ list = let counts = Char_tbl.create 16 in Seq.iter (fun c -> let count_c = Char_tbl.find_opt counts c |> Option.value ~default:0 in Char_tbl.replace counts c (count_c + 1)) seq; (* turn into a list *) Char_tbl.fold (fun c n l -> (c,n) :: l) counts [] |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2) val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = (* basic seq from a string *) # let seq = String.to_seq "hello world, and all the camels in it!" val seq : char Seq.t = # count_chars seq - : (Char.t * int) list = [(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3); ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1); ('s', 1); ('t', 2); ('w', 1)] (* "abcabcabc..." *) # let seq2 = Seq.cycle (String.to_seq "abc") |> Seq.take 31 val seq2 : char Seq.t = # String.of_seq seq2 - : String.t = "abcabcabcabcabcabcabcabcabcabca" # count_chars seq2 - : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)] ]} ,c=[ [,dee@@@@@@3,b,a,a,b,b,b,b,b@w1@A@*3)A@))I@))(@((@(e(@''@'t'.@'&@&&D@&$%@%%j@%J$@$$Y@$9#@##@""@""r@"R"+@" !@!~!xA@ F @l@L@@p@^@>@t@q]@V@P@@T@@:)6@@N:@@@i@I@@@3,,,,,,,,@V@AV,,c,=,ee@@@,c,,@,@#MapT,ee,ee@,@@Б,,吠  Association tables over ordered types. This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map. For instance: {[ module IntPairs = struct type t = int * int let compare (x0,y0) (x1,y1) = match Stdlib.compare x0 x1 with 0 -> Stdlib.compare y0 y1 | c -> c end module PairsMap = Map.Make(IntPairs) let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world") ]} This creates a new module [PairsMap], with a new type ['a PairsMap.t] of maps from [int * int] to ['a]. In this example, [m] contains [string] values so its type is [string PairsMap.t]. ,ee,ii@@@@@@3,,,,,,,,@,+j@**hA@*&)@))h@)H)@((@(s(@''@'':@'&@&&X@&8%@%%m@%M$@$$?@$#@#|#:@#"@""@"" @!!A@  @ R@@_@x@X@X@ A@@b@@(@#A@A@@`@Y%@@k@d@@@c@@j@c@|@\@@j@J@@c@@l@z@@P@@"!A@A@  @@@@@@@@@@{z@kj@TS@<;@'&@@@@@@@@@w=@@rgaA@@n@@4u@.#A@A@@R@K@ @  v@ o )@ " @  @ n @  @  u@ n @  @ g @  @  u@ n @@B@"@@@@:[@3@+"GFA@?>A@21@@@@@@@@@@@@po@XW@CB@87@-,@@@@@@@Ha@@<@@Y@9@@@T,@A3+OrderedTypeV.ii.ii@.5h@БA+!tU.,ii.-ii@@;@@+A@@@@@.0ii@+ϐ; The type of the map keys. .=ii.>ii@@@@@@@@@.Vf@@@A@+.P@@@@@@@3.H.G.G.H.H.H.H.H@g@A @'compareΠ.Uij.Vij @б@г4!t.`ij .aij @@ @@@3.b.a.a.b.b.b.b.b@?9@A@@б@гE!t.qij.rij@@ @@@@@г.Q#int.~ij.ij@@ @@@@@@@@!@@@'@@$* @@@.ii@,+  A total ordering function over the keys. This is a two-argument function [f] such that [f e1 e2] is zero if the keys [e1] and [e2] are equal, [f e1 e2] is strictly negative if [e1] is smaller than [e2], and [f e1 e2] is strictly positive if [e1] is greater than [e2]. Example: a suitable ordering function is the generic structural comparison function {!Stdlib.compare}. .jj".kk@@@@@@@.g@@@,;.@@@@@@C@|A@["@@3........@H]$@A3........@@A.ii.kk@@,Q.Ð ) Input signature of the functor {!Make}. .kk.kl@@@@@@@.ii@@!SY.ll,.ll-@.@Б..搠/ {1:maps Maps} .l9l?.l9lS@@@@@@3........@A@d@@,:9@99@@@9@9@6@AA+#keyW/lUl`/lUlc@@;@@,A@@@@@/lUl[@,; The type of the map keys. /ldlj/ldl@@@@@@@@@/+i@@@A@,/%@@@@@@@;@A+!tX/*ll/+ll@А!a@3/1/0/0/1/1/1/1/1@Q:4;@@@A@A@G@B@@@/?ll@,ސ 0 The type of maps from type [key] to type ['a]. /Lll/Mll@@@@@@@@@/ej@@A/Pll/Qll@@@@@;$@A,A@I@B@@@@@ @@A@,/g@@@@@@@3/_/^/^/_/_/_/_/_@-@A%9@%emptyҠ/lll/mll@гK!t/ull/vll@А!a@Y@3/}/|/|/}/}/}/}/}@L\/@A/ll/ll@@@ @@@ @@@/ll@-+0 The empty map. /ll/lm @@@@@@@/k@@'@-;/@@@@@@(#addӠ/mm/mm@б#keyг#key/mm!/mm$@@ @@@3////////@C\:@A@@б$dataА!a@Y@/mm-/mm/@@б@г!t/mm6/mm7@А!a!/mm3/mm5@@@@@@( @@гȠ!t/mm>/mm?@А!a,6/mm;/mm=@@@2@@@= @@@@@@@@>9@@C0mm(@@UJ@@G0 mm@@@0 mm@-  [add ~key ~data m] returns a map containing the same bindings as [m], plus a binding of [key] to [data]. If [key] was already bound in [m] to a value that is physically equal to [data], [m] is returned unchanged (the result of the function is then physically equal to [m]). Otherwise, the previous binding of [key] in [m] disappears. @before 4.03 Physical equality was not ensured. 0m@mF0no@@@@@@@03l@@+@-0.@@@@@@g+add_to_listԠ01oo02oo@б#keyг=#key0>oo#0?oo&@@ @@@30@0?0?0@0@0@0@0@@:@A@@б$dataА!a@Y@0Soo/0Too1@@б@г4!t0^oo=0_oo>@г/䠐$list0hoo80ioo<@А!a!+0ooo50poo7@@@'@@@2 @@@@@@7 @@гX!t0ooJ0ooK@г0$list0ooE0ooI@А!aEO0ooB0ooD@@@K@@@V @@@@@@[ @@@+@@^3@@\W@@a0oo*#@@sh@@e0oo'@@@0oo*@.K [add_to_list ~key ~data m] is [m] with [key] mapped to [l] such that [l] is [data :: Map.find key m] if [key] was bound in [m] and [[data]] otherwise. @since 5.1 0oLoR0pp@@@@@@@0m@@:@.[0͐@@@@@@&updateՠ0pp$0pp*@б#keyгܠ#key0pp00pp3@@ @@@300000000@:@A@@б!fб@г0Q&option0pp=0ppC@А!a@Y@0pp:0pp<@@@ @@@"@@г0k&option1 ppJ1 ppP@А!a01ppG1ppI@@@ @@@7 @@@@@:@@б@г!t1&ppX1'ppY@А!a4J1-ppU1.ppW@@@:@@@Q @@г!t1;pp`1<ppa@А!aI_1Bpp]1Cpp_@@@O@@@f @@@@@i@@g4@@l1Opp7@@~s@@p1Spp,@@@1Vpp @. t [update ~key ~f m] returns a map containing the same bindings as [m], except for the binding of [key]. Depending on the value of [y] where [y] is [f (find_opt key m)], the binding of [key] is added, removed or updated. If [y] is [None], the binding is removed if it exists; otherwise, if [y] is [Some z] then [key] is associated to [z] in the resulting map. If [key] was already bound in [m] to a value that is physically equal to [z], [m] is returned unchanged (the result of the function is then physically equal to [m]). @since 4.06 1cpbph1drr@@@@@@@1|n@@+@/1w@@@@@@)singleton֠1zrr1{rr@б@г#key1rr1rr@@ @@@311111111@8@A@@б@А!a@Y@ 1rr1rs@@гw!t1rs1rs @А!a1rs1rs@@@@@@$ @@@@@'@@@-@@*0@@@1rr@/V r [singleton x y] returns the one-element map that contains a binding [y] for [x]. @since 3.12 1s s1sos@@@@@@@1o@@&@/f1ؐ@@@@@@I&removeנ1ss1ss@б@г堐#key1ss1ss@@ @@@311111111@bw8@A@@б@г͠!t1ss1ss@А!a@Y@2ss2ss@@@ @@@@@г砐!t2ss2ss@А!a,2ss2ss@@@ @@@3 @@@@@6@@@<@@9?@@@2'ss@/Ɛ = [remove x m] returns a map containing the same bindings as [m], except for [x] which is unbound in the returned map. If [x] was not in [m], [m] is returned unchanged (the result of the function is then physically equal to [m]). @before 4.03 Physical equality was not ensured. 24ss25tt@@@@@@@2Mp@@&@/2H@@@@@@X%mergeؠ2Ktu2Ltu@б!fб@гY#key2Zu u2[u u@@ @@@32\2[2[2\2\2\2\2\@u<@A@@б@г1ʠ&option2ku u2lu u%@А!a@Y@2wu u2xu u@@@ @@@@@б@г1栐&option2u u,2u u2@А!b@Y@32u u)2u u+@@@ @@@:@@г2&option2u u92u u?@А!c@Y@M2u u62u u8@@@ @@@T@@@!@@W$@@@@@@ZC@@@`@@]c@@б@г!t2uDuO2uDuP@А!a[m2uDuL2uDuN@@@a@@@t @@б@г!t2uDuW2uDuX@А!bV2uDuT2uDuV@@@\@@@ @@гȠ!t2uDu_2uDu`@А!cQ2uDu\2uDu^@@@W@@@ @@@@@@@@6@@9@@N@@3 u u@@@3 tt@0  [merge ~f m1 m2] computes a map whose keys are a subset of the keys of [m1] and of [m2]. The presence of each such binding, and the corresponding value, is determined with the function [f]. In terms of the [find_opt] operation, we have [find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2)] for any key [x], provided that [f x None None = None]. @since 3.12 3uaug3 ww@@@@@@@32q@@*@03-@@@@@@%union٠30 ww'31 ww,@б!fб@г>#key3? ww13@ ww4@@ @@@33A3@3@3A3A3A3A3A@<@A@@б@А!a@Y@ 3R ww83S ww:@@б@А!a 3Z ww>3[ ww@@@г2 &option3c wwG3d wwM@А!a%3j wwD3k wwF@@@#@@@, @@@'@@/@@@*@@2%@@@8@@5;@@б@гY!t3 wwU3 wwV@А!a=E3 wwR3 wwT@@@C@@@L @@б@гp!t3 ww]3 ww^@А!aT\3 wwZ3 ww\@@@Z@@@c @@г!t3 wwe3 wwf@А!aiq3 wwb3 wwd@@@o@@@x @@@@@{@@@6@@~9@@N@@3 ww.@@@3 ww#@1h  [union ~f m1 m2] computes a map whose keys are a subset of the keys of [m1] and of [m2]. When the same binding is defined in both arguments, the function [f] is used to combine them. This is a special case of [merge]: [union f m1 m2] is equivalent to [merge f' m1 m2], where - [f' _key None None = None] - [f' _key (Some v) None = Some v] - [f' _key None (Some v) = Some v] - [f' key (Some v1) (Some v2) = f key v1 v2] @since 4.03 3 wgwm3yfy~@@@@@@@3r@@*@1x3ꐠ@@@@@@(cardinalڠ3yy3yy@б@гΠ!t3yy3yy@А!a@ Y@343344444@>@A4yy4yy@@@ @@@ @@г3砐#int4yy4yy@@ @@@@@@@@@@@4yy @1 ? Return the number of bindings of a map. @since 3.12 4,yy4-yy@@@@@@@4Es@@@14@@@@@@@84N4M7 {1:bindings Bindings} 4Jyy4Kyz@@@@@@34I4H4H4I4I4I4I4I@Je1@A(bindings۠4Vzz4Wzz"@б@г7!t4azz'4bzz(@А!a@Y@  4mzz$4nzz&@@@ @@@ '@@г3$list4{zz74|zz;@В@г#key4zz-4zz0@@ @@@B@@@А!a-H4zz34zz5@@@@@6@@Q@@@* @@@V4zz,(@@@7@@Z:+@@@4zz.@2H Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering [Ord.compare], where [Ord] is the argument given to {!Map.Make}. @since 3.12 4 z<zB4${,{D@@@@@@@4t@@>@2X4ʐ@@@@@@y+min_bindingܠ4&{F{P4&{F{[@б@г!t4&{F{`4&{F{a@А!a@Y@344444444@>@A4&{F{]4&{F{_@@@ @@@ @@В@г#key4&{F{f4&{F{i@@ @@@@@@А!a% 5&{F{l5&{F{n@@@@@.@@)@@@' @@,*5&{F{o@@@5&{F{L@2 Return the binding with the smallest key in a given map (with respect to the [Ord.compare] ordering), or raise [Not_found] if the map is empty. @since 3.12 5 '{p{v5!*||6@@@@@@@59u@@@254@@@@@@L/min_binding_optݠ57,|8|B58,|8|Q@б@г!t5B,|8|V5C,|8|W@А!a@&Y@35J5I5I5J5J5J5J5J@k>@A5P,|8|S5Q,|8|U@@@ @@@ @@г4&option5^,|8|f5_,|8|l@В@гk#key5l,|8|\5m,|8|_@@ @@@ $@@@А!a/*5x,|8|b5y,|8|d@@@@@8@@!3@@@* @@@#85,|8|[(@@@7@@$<:+@@@5,|8|>.@3+ Return the binding with the smallest key in the given map (with respect to the [Ord.compare] ordering), or [None] if the map is empty. @since 4.05 5-|m|s50}}*@@@@@@@5v@@>@3;5@@@@@@[+max_bindingޠ52},}652},}A@б@г!t52},}F52},}G@А!a@.Y@'355555555@z>@A52},}C52},}E@@@ @@@) @@В@гڠ#key52},}L52},}O@@ @@@*@@@А!a% 52},}R52},}T@@@@@.@@+)@@@' @@,,*52},}U@@@52},}2@3 x Same as {!min_binding}, but returns the binding with the largest key in the given map. @since 3.12 63}V}\65}}@@@@@@@6w@@@36@@@@@@L/max_binding_optߠ67}}67}}@б@г!t6%7}}6&7}}@А!a@8Y@/36-6,6,6-6-6-6-6-@k>@A637}}647}}@@@ @@@1 @@г5&option6A7}~ 6B7}~@В@гN#key6O7}}6P7}~@@ @@@2$@@@А!a/*6[7}~6\7}~@@@@@8@@33@@@* @@@586i7}}(@@@7@@6<:+@@@6o7}}.@4 | Same as {!min_binding_opt}, but returns the binding with the largest key in the given map. @since 4.05 6|8~~6}:~~@@@@@@@6x@@>@46@@@@@@[&choose6<~~6<~~@б@гt!t6<~~6<~~@А!a@@Y@9366666666@z>@A6<~~6<~~@@@ @@@; @@В@г#key6<~~6<~~@@ @@@<@@@А!a% 6<~~6<~~@@@@@.@@=)@@@' @@>,*6<~~@@@6<~~@4x Return one binding of the given map, or raise [Not_found] if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps. @since 3.12 6=~~6@@@@@@@@6y@@@46@@@@@@L*choose_opt6B6B@б@гޠ!t7B7 B@А!a@JY@A377777777@k>@A7B7B@@@ @@@C @@г6&option7$B7%B@В@г1#key72B73B@@ @@@D$@@@А!a/*7>B7?B@@@@@8@@E3@@@* @@@G87LB(@@@7@@H<:+@@@7RB.@4񐠠 Return one binding of the given map, or [None] if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps. @since 4.05 7_C7`F@@@@@@@7xz@@>@57s@@@@@@[779 {1:searching Searching} 7}H7~H@@@@@@37|7{7{7|7|7|7|7|@m1@A$find7J7J@б@г#key7J7J@@ @@@K@@б@гy!t7J7J@А!a@RY@L/7J7J@@@ @@@N6@@А!a:7J7J@@@ @@O?@@@+@@PB.@@@7J @5c s [find x m] returns the current value of [x] in [m], or raises [Not_found] if no binding for [x] exists. 7K7L+k@@@@@@@7{@@@5s7吠@@@@@@a(find_opt7Nmw7Nm@б@г#key7Nm7Nm@@ @@@S377777777@zu8@A@@б@гڠ!t8Nm8Nm@А!a@\Y@T8Nm8Nm@@@ @@@V@@г7}&option8Nm8Nm@А!a,8%Nm8&Nm@@@ @@@X3 @@@@@Y6@@@<@@Z9?@@@84Nms@5Ӑ [find_opt x m] returns [Some v] if the current value of [x] in [m] is [v], or [None] if no binding for [x] exists. @since 4.05 8AO8BQ!9@@@@@@@8Z|@@&@58U@@@@@@X*find_first8XS;E8YS;O@б!fб@г f#key8gS;T8hS;W@@ @@@]38i8h8h8i8i8i8i8i@u<@A@@г84$bool8vS;[8wS;_@@ @@@^@@@@@_@@б@г ^!t8S;g8S;h@А!a@hY@`'8S;d8S;f@@@ @@@b.@@В@г #key8S;l8S;o@@ @@@c?@@@А!a#E8S;r8S;t@@@@@,@@dN@@@' @@eQ* @@dD@@fT8S;Q@@@8S;A@6c  [find_first ~f m], where [f] is a monotonically increasing function, returns the binding of [m] with the lowest key [k] such that [f k], or raises [Not_found] if no such key exists. For example, [find_first (fun k -> Ord.compare k x >= 0) m] will return the first binding [k, v] of [m] where [Ord.compare k x >= 0] (intuitively: [k >= x]), or raise [Not_found] if [x] is greater than any element of [m]. @since 4.05 8Tu{8]Qi@@@@@@@8}@@"@6s8吠@@@@@@t.find_first_opt8_ku8_k@б!fб@г #key8_k8_k@@ @@@i388888888@<@A@@г8Ġ$bool9_k9_k@@ @@@j@@@@@k@@б@г !t9_k9_k@А!a@vY@l'9$_k9%_k@@@ @@@n.@@г8&option92_k93_k@В@г ?#key9@_k9A_k@@ @@@oI@@@А!a-O9L_k9M_k@@@@@6@@pX@@@* @@@r]9Z_k(@@@7@@sa:+@@tT@@td9a_k/@@@9d_kq2@7 [find_first_opt ~f m], where [f] is a monotonically increasing function, returns an option containing the binding of [m] with the lowest key [k] such that [f k], or [None] if no such key exists. @since 4.05 9q`9rc@@@@@@@9~@@B@79@@@@@@)find_last9e9e@б!fб@г #key9e9e@@ @@@w399999999@<@A@@г9d$bool9e9e@@ @@@x@@@@@y@@б@г !t9e9e@А!a@Y@z'9e9e@@@ @@@|.@@В@г ՠ#key9e9e@@ @@@}?@@@А!a#E9e9e@@@@@,@@~N@@@' @@Q* @@dD@@T9e@@@9e@7 [find_last ~f m], where [f] is a monotonically decreasing function, returns the binding of [m] with the highest key [k] such that [f k], or raises [Not_found] if no such key exists. @since 4.05 :f:i@@@@@@@:@@"@7:@@@@@@t-find_last_opt:k:k@б!fб@г &#key:'k:(k@@ @@@3:):(:(:):):):):)@<@A@@г9$bool:6k:7k@@ @@@@@@@@@@б@г !t:Hk:Ik@А!a@Y@':Tk:Uk@@@ @@@.@@г9&option:bk:ck@В@г o#key:pk :qk @@ @@@I@@@А!a-O:|k:}k@@@@@6@@X@@@* @@@]:k(@@@7@@a:+@@tT@@d:k/@@@:k2@83 [find_last_opt ~f m], where [f] is a monotonically decreasing function, returns an option containing the binding of [m] with the highest key [k] such that [f k], or [None] if no such key exists. @since 4.05 :l :p@@@@@@@:@@B@8C:@@@@@@::; {1:traversing Traversing} :r%:rE@@@@@@3::::::::@1@A$iter:tGQ:tGU@б!fб#keyг ۠#key:tG^:tGa@@ @@@ @@б$dataА!a@Y@-:tGj:tGl@@г:$unit:tGp:tGt@@ @@@<@@@@?;tGe @@1&@@C;tGZ @@б@г 堐!t;tG|;tG}@А!a,T;tGy;tG{@@@2@@@[ @@г:Ѡ$unit;$tG;%tG@@ @@@h@@@@@k@@`-@@n;0tGW @@@;3tGM@8Ґ  [iter ~f m] applies [f] to all bindings in map [m]. [f] receives the key as first argument, and the associated value as second argument. The bindings are passed to [f] in increasing order with respect to the ordering over the type of the keys. ;@u;Ax[@@@@@@@;Y@@@8;T@@@@@@$fold;Wz;Xz@б!fб#keyг g#key;h{;i{@@ @@@3;j;i;i;j;j;j;j;j@>@A@@б$dataА!a@Y@;}{;~{@@б@А#acc@Y@;{;{@@А#acc ";{;{@@@@@' @@% @@*;{@@<1@@.;{ @@б@г |!t;{;{@А!a5?;{;{@@@;@@@F @@б$initА#acc7N;{;{@@А#acc=T;{;{@@BB@@Y;{@@@@@]@@r4@@`;{ @@@;z@9p [fold ~f m ~init] computes [(f kN dN ... (f k1 d1 init)...)], where [k1 ... kN] are the keys of all bindings in [m] (in increasing order), and [d1 ... dN] are the associated data. ;| ;~@@@@@@@;@@@9;򐠠@@@@@@<;? {1:transforming Transforming} ;;@@@@@@3;;;;;;;;@1@A#map<< @б!fб@А!a@Y@<<@@А!b@Y@%<$<%@@@ @@*@@б@г !t<2'<3(@А!a%:<9$<:&@@@+@@@A @@г !t [map ~f m] returns a map with same domain as [m], where the associated value [a] of all bindings of [m] has been replaced by the result of the application of [f] to [a]. The bindings are passed to [f] in increasing order with respect to the ordering over the type of the keys.  > @А!b7T> >  @@@=@@@[ @@@@@^@@q4@@a>@@@>@;  [filter_map ~f m] applies the function [f] to every binding of [m], and builds a map from the results. For each binding [(k, v)] in the input map: - if [f k v] is [None] then [k] is not in the result, - if [f k v] is [Some v'] then the binding [(k, v')] is in the output map. For example, the following function on maps whose values are lists {[ filter_map (fun _k li -> match li with [] -> None | _::tl -> Some tl) m ]} drops all bindings of [m] whose value is an empty list, and pops the first element of each value that is non-empty. @since 4.11 >& >'@@@@@@@>?@@'@;>:@@@@@@)partition>=>>@б!fб@гK#key>L>M@@ @@@3>N>M>M>N>N>N>N>N@<@A@@б@А!a@Y@ >_>`@@г>&$bool>h>i@@ @@@@@@@@@@@%@@"( @@б@гS!t>}>~@А!a*2>>@@@0@@@9 @@В@гl!t> > @А!aCK> > @@@I@@@R @@@г!t>>@А!aZb>>@@@`@@@i @@@@ @ @@p%@@@> @@sA@@V@@v>@@@>@>@@@@@@@>@@.@쐠@@@@@@%split>!+>!0@б@г#key>!2>!5@@ @@@3>>>>>>>>@8@A@@б@г᠐!t? !<? !=@А!a@Y@?!9?!;@@@ @@@@@В@г!t?)!D?*!E@А!a0?0!A?1!C@@@$@@@7 @@@г>&option?@!K?A!Q@А!a5G?G!H?H!J@@@;@@@N @@@г-!t?W!W?X!X@А!aL^?^!T?_!V@@@R@@@e @@@@7@"@ @@n>@@@W @@qZ@@@w@@tz@@@?v!'@=  [split x m] returns a triple [(l, data, r)], where [l] is the map with all the bindings of [m] whose key is strictly less than [x]; [r] is the map with all the bindings of [m] whose key is strictly greater than [x]; [data] is [None] if [m] contains no binding for [x], or [Some v] if [m] binds [v] to [x]. @since 3.12 ?Y_?@@@@@@@?@@/@=%?@@@@@@?? + {1:predicates Predicates and comparisons} ??)@@@@@@3????????@1@A(is_empty?+5?+=@б@г!t?+B?+C@А!a@ Y@ ?+??+A@@@ @@@'@@г?$bool?+G?+K@@ @@@4@@@@@ 7@@@?+1 @=| % Test whether a map is empty or not. ?LR?L|@@@@@@@@@@@=?@@@@@@V#mem@~@~@б@г #key@ ~@ ~@@ @@@ 3@@ @ @@@@@@oj8@A@@б@г!t@~@~@А!a@Y@ @)~@*~@@@ @@@@@г?$bool@7~@8~@@ @@@+@@@@@.@@@4@@17 @@@@E~@=䐠 ^ [mem x m] returns [true] if [m] contains a binding for [x], and [false] otherwise. @R@S @@@@@@@@k@@@=@f@@@@@@P%equal@i @j @б#cmpб@А!a@"Y@3@v@u@u@v@v@v@v@v@i~8@A@| "@} $@@б@А!a @ (@ *@@г@K$bool@ .@ 2@@ @@@@@@!@@@@@$@@ @@б@гx!t@ :@ ;@А!a4/@ 7@ 9@@@:@@@6 @@б@г!t@ B@ C@А!aKF@ ?@ A@@@Q@@@M @@г@$bool@ G@ K@@ @@@Z@@@@@]@@@.@@`1 @@oF@@ c@ @@@@ @> [equal ~cmp m1 m2] tests whether the maps [m1] and [m2] are equal, that is, contain equal keys and associate them with equal data. [cmp] is the equality predicate used to compare the data associated with the keys. @LR@M@@@@@@@A@@"@>A@@@@@@'compareAOYAO`@б#cmpб@А!a@0Y@#3AAAAAAAA@8@AAOgAOi@@б@А!a AOmA Oo@@г@#intA(OsA)Ov@@ @@@$@@@!@@%@@@$@@& @@б@г!tA=O~A>O@А!a4/ADO{AEO}@@@:@@@(6 @@б@г*!tATOAUO@А!aKFA[OA\O@@@Q@@@*M @@гA<#intAiOAjO@@ @@@+Z@@@@@,]@@@.@@-`1 @@oF@@.cAxOb@@@A{OU@? Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps. AA+@@@@@@@A@@"@?*A@@@@@@'for_allA-7A->@б!fб@г#keyA-CA-F@@ @@@13AAAAAAAA@<@A@@б@А!a@ BIBJ@@гB$boolBRBS @@ @@@?@@@@@@@@@%@@A"( @@б@г=!tBgBh@А!a*2BnBo@@@0@@@C9 @@гB:$boolB|B}@@ @@@DF@@@@@EI@@\,@@FLB @@@B@@* v [exists ~f m] checks if at least one binding of the map satisfies the predicate [f]. @since 3.12 B"B@@@@@@@B@@@@:B@@@@@@lBB; {1:converting Converting} BB@@@@@@3BBBBBBBB@~1@A'to_listBB@б@г!tBB@А!a@RY@I BB@@@ @@@K'@@гBc$listBB@В@г#keyBB@@ @@@LB@@@А!a-HCC@@@@@6@@MQ@@@* @@@OVC(@@@7@@PZ:+@@@C.@@ 6 [to_list m] is {!bindings}[ m]. @since 5.1 C"C#4@@@@@@@C;@@>@@C6@@@@@@y'of_listC96@C:6G@б@гB$listCD6UCE6Y@В@гQ#keyCR6KCS6N@@ @@@S3CTCSCSCTCTCTCTCT@F@A@@@А!a@\Y@T Ce6QCf6S@@@@@@@U@@@1 @@@WCs6J/@@гQ!tC{6`C|6a@А!a"*C6]C6_@@@(@@@Y1 @@@@@Z4@@@C6<@A- [of_list bs] adds the bindings of [bs] to the empty map, in list order (if a key is bound twice in [bs] the last one takes over). @since 5.1 CbhC@@@@@@@C@@#@A=C@@@@@@S&to_seqC%C+@б@г!tC1C2@А!a@fY@]3CCCCCCCC@r>@AC.C0@@@ @@@_ @@гBb#Seq!tCACD@ CECF@@В@г#keyC7C:@@ @@@`-@@@А!a83C=C?@@@@@A@@a<@@@3 @@@cAD 6)@@@@@@dEC,@@@D!/@A L Iterate on the whole map, in ascending order of keys @since 4.07 DGMD@@@@@@@D6@@?@AD1@@@@@@d*to_rev_seqD4D5@б@г!tD?D@@А!a@pY@g3DGDFDFDGDGDGDGDG@>@ADMDN@@@ @@@i @@гB#Seq!tD_D`@ DcDd@@В@гq#keyDrDs@@ @@@j-@@@А!a83D~D@@@@@A@@k<@@@3 @@@mAD)@@@@@@nEC,@@@D/@B1 M Iterate on the whole map, in descending order of keys @since 4.12 DD(@@@@@@@D@@?@BAD@@@@@@d+to_seq_fromD*4D*?@б@г#keyD*BD*E@@ @@@q3DDDDDDDD@}8@A@@б@г!tD*LD*M@А!a@|Y@rD*ID*K@@@ @@@t@@гCu#Seq!tD*\D*_@ D*`D*a@@В@г#keyE*RE*U@@ @@@uB@@@А!a6HE*XE*Z@@@@@?@@vQ@@@3 @@@xVE*Q)@@@@@@yZC,@@@`@@z]c/@@@E&*02@BŐ [to_seq_from k m] iterates on a subset of the bindings of [m], in ascending order of keys, from key [k] or above. @since 4.07 E3bhE4@@@@@@@EL@@B@BEG@@@@@@|'add_seqEJ EK@б@гC#Seq!tEY!EZ$@ E]%E^&@@В@гk#keyElEm@@ @@@}3EnEmEmEnEnEnEnEn@O@A@@@А!a@Y@~ EE@@@@@@@@@@: @@@E0@@б@гm!tE-E.@А!a$,E*E,@@@*@@@3 @@г!tE5E6@А!a9AE2E4@@@?@@@H @@@@@K@@@7@@N3@@@E@Ca D Add the given bindings to the map, in order. @since 4.07 E7=En@@@@@@@E@@&@CqE㐠@@@@@@m&of_seqEE@б@гDz#Seq!tEE@ EE@@В@г#keyFF @@ @@@3F F F F F F F F @O@A@@@А!a@Y@ FF@@@@@@@@@@: @@@F)0@@г!tF1F2@А!a"*F8F9@@@(@@@1 @@@@@4@@@FD@C㐠 ; Build a map from the given bindings @since 4.07 FQFR@@@@@@@Fj@@#@CFe@@@@@@S@e_A@>A@@]@=@@@K@+h@H@Y@&@i@I@@j@@4@@V@6 @  *@  @ | @  a@ A @  :@  @  @ @e@,@@a@A@/@@#@@{$@@$@@r@x@@3FFFFFFFF@z@A]3FFFFFFFF@@AFl0l4F@@D_Fѐ * Output signature of the functor {!Make}. FF4@@@@@@@Fll @3FFFFFFFF@@A@$MakeZF6AF6E@F@@Т#Ord[F6QF6T@Рנ+OrderedTypeF6WF6b@3FFFFFFFF@/A@A@w@W@[@;@T@4@@H@(@l@L@@m%@@F@&@_@?@c@C @  7@  @ f @  `@ - @  I@ ) @  @ p@P@b@B@c@C@D@$@6@@?@@-@ @s@@D󐠠@@@@@@@Aml@@УР!SGi6gGj6h@3GiGhGhGiGiGiGiGi@x@@G@@A  @@y#keyGziwG{iz@+@;@@@A!t@@@@@@@GirGi@@@@G@@@Aг #OrdGi}Gi@Gi@@@/@@@y!tGG@+А!a@b\@FGG@@,@; @A@AFK#Map$Make!t\@^@@@`I@B@@@GG@@@@G@@@AгGG@GG@@#OrdGG@G@&G @!@А!a+GG@@@9)@@+@@\;@@@Axw@@@@@@@v@@@sA@\;V@A@AFLKJIH@@@GF@@E@@@BA@@@@@{@lh)@@@[V@[@@@_@@@@@@@@@@ @@@@@(۠@@@@@@0@@@@@@@@@@@@@@{3@@@m@ka@@@Ue@@@@@~@Ok@@@}So@@@|@@{@@z@@y@@@R@@@x@b@@@w@@v@@u@@@a@@@t@q@@@su@@@r@@q@@p@dbT@EA@v@@@o@3)@@@n@@@@m@@@l@@k@@j@@i@9@@@h@#@@@g @@@f@@e@@d@@c@@@@@@b@v@xh{@@@a@@`@@_@@^@@@@]@@@@\à@@@[@@Z@@Y@@X@@@͠@@@W@@@V@@U@@@ڠ@@@T{@@@@S@@@R@@@Q@@P@TRD@5@'@@@O@@@@N@1@@M@@L@@@@@@K @@@@J@@@I@@@H@@G@@|@n@@@F@@@@E@x@@D@@C@DB4@%@.@@@B @.@@@A@$@@@@@@?@@>@@@E@@@=@B@@@<@@@;@@:@{@l@X^@@@9P@X@@@8@k@@7@@@6@@5@)'@@d@@@4@t@@@3@@2@@1@@@s@@@0@@@@/@@@.@@-@@,@igY@JF@@@@+8@@@*@@)@!@@@(@@@@'@+@@&@@%@@$@@@@@@#@@@"@@!@@@@ @@@@@@@@@@@@@@@wug@XT@@@@F@@@@@@٠/@@@@@@@@9@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@ @@ @u@SOM@@@ A<4@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@1@@@@@@@@@@xvh@FB@=2@@@AB@@@E;@@@@@@@@   @  @F@@@@  @@@@@X @@@\ @@@@@@@@   v@ g c@]@@@@ R J@@@@@@@@r Z@@@v ^@@@@@@@@   @  @w@@@@  Ԡ @@@@@@@@ @@@ @@@@@@@@   ~@ o k@@@@@ Z R@@@@@@@@ b@@@@ j@@@נ@ p@@@@@@@@@@   @ @@@@@Ġ @@@@̠ @@@Ϡ@  @@@Р@ؠ @@@@@@@@@@ x v h@ F@ 8@@@ ,@@@@@@   @ @@@@@ @@@ @@@@@@@@   @  @ @  @@@@@@@@  @@@@ @@@ ^@@@@@@@@@@ I G 9@ * &@ !@ # @@@@@@@@& +@@@@, 1@@@ @@@@@@@@@@   @  @0@@@@  @@@@@@@@E @@@ m@@@@@@@@ [ Y K@ < 8@I@@@@ ' @@@@@@@@^ /@@@@@@@@@@@@@k@@@@k@@@@@@@@@@@@ywi@Z@V@~@@@@@@@@@@D@@@@@@@@@@@J>۠@@@@@@@@@@@@@@@@@@JWsr@@@@@@@@@@@@@EC5@&@@@@@Р @@@Ju@@@@@@@@@@@@@@@@@J@@@@@@@@@@@@@@@@@@@@@@RPB@3@J/.@@@@@@@~@@@}@@@|@@{@@@c@@K:<3L,L+L+L,L,L,L,L,@9@AL16Ph@@ILB \ Functor building an implementation of the map structure given a totally ordered type. L?L@@@@@@@@LB6:y@z@@.Z*@|}@u@"I퐠@@@@@@y@@@3LVLULULVLVLVLVLV@d@zqlkA@dcA@WV@PO@<;@! @@@@@@@|{@kj@VU@ED@0/@@  @@@@@@xw@a`@LK@<;@'&@@@@@@@~}@dc@ML@65@! @  @@@@@@ky@Aw3LLLLLLLL@@ALeeL@@@Lee@@#Set]LL@L@@БLL䐠  Sets over ordered types. This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance. The {!Make} functor constructs implementations for any type, given a [compare] function. For instance: {[ module IntPairs = struct type t = int * int let compare (x0,y0) (x1,y1) = match Stdlib.compare x0 x1 with 0 -> Stdlib.compare y0 y1 | c -> c end module PairsSet = Set.Make(IntPairs) let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13)) ]} This creates a new module [PairsSet], with a new type [PairsSet.t] of sets of [int * int]. L&(L  @@@@@@3LLLLLLLL@  @A@f@@.@)A@A@q@Q@U@5@N@.@@B@"@f@F@@g@@@@ @Y@9@]@=@1@@`@Z@'@C@#@@j@J @  \@ < @  ]@ = @  >@  @  0@  @  9@ @'@@m @@@x@pgbaA@ZYA@ML@FE@21@@@@@@@@rq@a`@LK@;:@&%@@@@@@@@nm@WV@BA@21@@@@@@@@ts@ZY@CB@,+@@@@@@@@ao@@@@ @AР+OrderedType_M!M!(@M@БA+!t^M#3>M#3?@@;@@KFA@@@@@M#39@Kk? The type of the set elements. M$@HM$@l@@@@@@@@@M@@@A@KzM쐠@@@@@@@3MMMMMMMM@@A @'compareàM&nxM&n@б@г4!tM&nM&n@@ @@@3MMMMMMMM@?9@A@@б@гE!tN &nN&n@@ @@@@@гM#intN&nN&n@@ @@@@@@@@!@@@'@@$* @@@N(&nt@Kǐ  A total ordering function over the set elements. This is a two-argument function [f] such that [f e1 e2] is zero if the elements [e1] and [e2] are equal, [f e1 e2] is strictly negative if [e1] is smaller than [e2], and [f e1 e2] is strictly positive if [e1] is greater than [e2]. Example: a suitable ordering function is the generic structural comparison function {!Stdlib.compare}. N5'N6-0e@@@@@@@NN@@@KNI@@@@@@C@|A@["@@3NENDNDNENENENENE@H]$@A3NHNGNGNHNHNHNHNH@h@ANM"+/NN.fm@@KN_ ) Input signature of the functor {!Make}. N\/npN]/n@@@@@@@N_!@}@!SbNi1Nj1@N@БNN/ {1:sets Sets} N4N4@@@@@@3N~N}N}N~N~N~N~N~@A@d@@L(:9@99@@@9@9@6@AA+#elt`N6N6@@;@@LA@@@@@N6@L@? The type of the set elements. N7N7@@@@@@@@@N@@@A@LON@@@@@@@;@A+!taN9N9@@;@@LDA@@@@@N9@Li3 The type of sets. N:%N:=@@@@@@@@@N@@@A@LxNꐠ@@@@@@@3NNNNNNNN@eNH@A!@%emptyǠN<?IN<?N@г3!tN<?PN<?Q@@ @@@3NNNNNNNN@>8@A@@@O<?E @L0 The empty set. O=RXO=Rm@@@@@@@O)@@@LO$@@@@@@!#addȠO'?oyO(?o|@б@г#eltO2?o~O3?o@@ @@@3O4O3O3O4O4O4O4O4@:M8@A@@б@г}!tOC?oOD?o@@ @@@@@г!tOP?oOQ?o@@ @@@@@@@@!@@@'@@$* @@@O^?ou@L  [add x s] returns a set containing all elements of [s], plus [x]. If [x] was already in [s], [s] is returned unchanged (the result of the function is then physically equal to [s]). @before 4.03 Physical equality was not ensured. Ok@OlC_@@@@@@@O@@@M O@@@@@@C)singletonɠOEOE@б@г#eltOEOE@@ @@@3OOOOOOOO@\q8@A@@г֠!tOEOE@@ @@@@@@@@@@@OE @MF @ [singleton x] returns the one-element set containing only [x]. OFOF@@@@@@@O@@@MVOȐ@@@@@@1&removeʠOHOH@б@г9#eltOHOH@@ @@@3OOOOOOOO@J_8@A@@б@г!!tOH!OH"@@ @@@@@г.!tOH&OH'@@ @@@@@@@@!@@@'@@$* @@@PH@M  [remove x s] returns a set containing all elements of [s], except [x]. If [x] was not in [s], [s] is returned unchanged (the result of the function is then physically equal to [s]). @before 4.03 Physical equality was not ensured. PI(.PL8@@@@@@@P(@@@MP#@@@@@@C%unionˠP&N:DP'N:I@б@гk!tP1N:KP2N:L@@ @@@3P3P2P2P3P3P3P3P3@\q8@A@@б@г|!tPBN:PPCN:Q@@ @@@@@г!tPON:UPPN:V@@ @@@@@@@@!@@@'@@$* @@@P]N:@@M, Set union. PjOW]PkOWn@@@@@@@P@@@N P~@@@@@@C%inter̠PQpzPQp@б@гƠ!tPQpPQp@@ @@@3PPPPPPPP@\q8@A@@б@гנ!tPQpPQp@@ @@@@@г䠐!tPQpPQp@@ @@@@@@@@!@@@'@@$* @@@PQpv@NW3 Set intersection. PRPR@@@@@@@P@@@NgPِ@@@@@@C(disjoint͠PTPT@б@г!!tPTPT@@ @@@3PPPPPPPP@\q8@A@@б@г2!tPTPT@@ @@@@@гPà$boolQTQT@@ @@@@@@@@!@@@'@@$* @@@QT@N 6 Test if two sets are disjoint. @since 4.08 Q UQ!V@@@@@@@Q9@@@NQ4@@@@@@C$diffΠQ7XQ8X!@б@г|!tQBX#QCX$@@ @@@3QDQCQCQDQDQDQDQD@\q8@A@@б@г!tQSX(QTX)@@ @@@@@г!tQ`X-QaX.@@ @@@@@@@@!@@@'@@$* @@@QnX@O \ Set difference: [diff s1 s2] contains the elements of [s1] that are not in [s2]. Q{Y/5Q|Zt@@@@@@@Q@@@OQ@@@@@@C(cardinalϠQ\Q\@б@гנ!tQ\Q\@@ @@@3QQQQQQQQ@\q8@A@@гQ#intQ\Q\@@ @@@@@@@@@@@Q\ @OV ) Return the number of elements of a set. Q]Q]@@@@@@@Q@@@OfQؐ@@@@@@1QQ吠7 {1:elements Elements} Q_Q_ @@@@@@3QQQQQQQQ@CX1@A(elementsРQaQa!@б@г3!tQa#Qa$@@ @@@@@гQ$listRa,Ra0@гs#eltRa(Ra+@@ @@@1@@@@@@6 @@@"@@9%@@@R a@O Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering [Ord.compare], where [Ord] is the argument given to {!Set.Make}. R-b17R.e@@@@@@@RF@@*@ORA@@@@@@X'min_eltѠRDg'REg.@б@г!tROg0RPg1@@ @@@3RQRPRPRQRQRQRQRQ@ql8@A@@г#eltR^g5R_g8@@ @@@@@@@@@@@Rig# @P Return the smallest element of the given set (with respect to the [Ord.compare] ordering), or raise [Not_found] if the set is empty. Rvh9?Rwj@@@@@@@R@@@PR@@@@@@1+min_elt_optҠRlRl@б@гҠ!tRlRl@@ @@@3RRRRRRRR@J_8@A@@гR&optionRlRl@г#eltRlRl@@ @@@@@@@@@ @@@$@@!'@@@Rl@P` Return the smallest element of the given set (with respect to the [Ord.compare] ordering), or [None] if the set is empty. @since 4.05 Rm Rp@@@@@@@R@@*@PpR␠@@@@@@@'max_eltӠRrRr@б@г*!tRrRr@@ @@@3RRRRRRRR@Yn8@A@@гb#eltRrSr@@ @@@@@@@@@@@S r @P Q Same as {!min_elt}, but returns the largest element of the given set. SsSt1@@@@@@@S0@@@PS+@@@@@@1+max_elt_optԠS.v3=S/v3H@б@гs!tS9v3JS:v3K@@ @@@3S;S:S:S;S;S;S;S;@J_8@A@@гR&optionSHv3SSIv3Y@г#eltSRv3OSSv3R@@ @@@@@@@@@ @@@$@@!'@@@Sbv39@Q k Same as {!min_elt_opt}, but returns the largest element of the given set. @since 4.05 SowZ`Spy@@@@@@@S@@*@QS@@@@@@@&chooseՠS{S{@б@гˠ!tS{S{@@ @@@3SSSSSSSS@Yn8@A@@г#eltS{S{@@ @@@@@@@@@@@S{ @QJ Return one element of the given set, or raise [Not_found] if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets. S|S~x@@@@@@@S@@@QZS̐@@@@@@1*choose_opt֠SS@б@г!tSS@@ @@@3SSSSSSSS@J_8@A@@гSH&optionSS@гV#eltSS@@ @@@@@@@@@ @@@$@@!'@@@T@Q Return one element of the given set, or [None] if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets. @since 4.05 TT@@@@@@@T)@@*@QT$@@@@@@@T2T19 {1:searching Searching} T.T/@@@@@@3T-T,T,T-T-T-T-T-@Rg1@A$findנT:T;@б@г#eltTETF@@ @@@@@б@г!tTTTU@@ @@@)@@гĠ#eltTaTb@@ @@@6@@@@@9@@@%@@<( @@@To@R [find x s] returns the element of [s] equal to [x] (according to [Ord.compare]), or raise [Not_found] if no such element exists. @since 4.01 T|T}@@@@@@@T@@@RT@@@@@@[(find_optؠTT@б@г#eltTT@@ @@@3TTTTTTTT@to8@A@@б@г預!tTT@@ @@@@@гT&optionTT@г)#eltTT@@ @@@(@@@@@@- @@@"@@0%@@@6@@39@@@T@Rx [find_opt x s] returns the element of [s] equal to [x] (according to [Ord.compare]), or [None] if no such element exists. @since 4.05 TTz@@@@@@@T@@-@RT@@@@@@R*find_first٠TT@б!fб@гo#eltU U @@ @@@3UU U UUUUU@o<@A@@гT٠$boolUU@@ @@@@@@@@@@б@гg!tU-U.@@ @@@!@@г#eltU:U;@@ @@@.@@@@@1@@D$@@4UF @@@UI@R萠  [find_first ~f s], where [f] is a monotonically increasing function, returns the lowest element [e] of [s] such that [f e], or raises [Not_found] if no such element exists. For example, [find_first (fun e -> Ord.compare e x >= 0) s] will return the first element [e] of [s] where [Ord.compare e x >= 0] (intuitively: [e >= x]), or raise [Not_found] if [x] is greater than any element of [s]. @since 4.05 UVUW@@@@@@@Uo@@@RUj@@@@@@T.find_first_optڠUmUn@б!fб@гߠ#eltU|U}@@ @@@3U~U}U}U~U~U~U~U~@q<@A@@гUI$boolUU@@ @@@@@@@@@@б@гנ!tUU@@ @@@!@@гU &optionUU@г#eltUU@@ @@@8@@@@@@= @@@"@@@%@@S3@@CU@@@U@Sg [find_first_opt ~f s], where [f] is a monotonically increasing function, returns an option containing the lowest element [e] of [s] such that [f e], or [None] if no such element exists. @since 4.05 UU@@@@@@@U@@.@SwU鐠@@@@@@c)find_last۠UU@б!fб@г^#eltUU@@ @@@3UUUUUUUU@<@A@@гUȠ$boolV V  @@ @@@@@@@@@@б@гV!tVV@@ @@@!@@г#eltV)V*@@ @@@.@@@@@1@@D$@@4V5 @@@V8@Sא [find_last ~f s], where [f] is a monotonically decreasing function, returns the highest element [e] of [s] such that [f e], or raises [Not_found] if no such element exists. @since 4.05 VEVF@@@@@@@V^@@@SVY@@@@@@T-find_last_optܠV\V]@б!fб@гΠ#eltVkVl@@ @@@3VmVlVlVmVmVmVmVm@q<@A@@гV8$boolVz!V{%@@ @@@@@@@@@@б@гƠ!tV*V+@@ @@@ !@@гU&optionV3V9@г#eltV/V2@@ @@@ 8@@@@@@ = @@@"@@ @%@@S3@@ CV@@@V@TV [find_last_opt ~f s], where [f] is a monotonically decreasing function, returns an option containing the highest element [e] of [s] such that [f e], or [None] if no such element exists. @since 4.05 V:@V*@@@@@@@V@@.@TfVؐ@@@@@@cVV吠; {1:traversing Traversing} V,2V,R@@@@@@3VVVVVVVV@u1@A$iterݠVT^VTb@б!fб@г`#eltVTgVTj@@ @@@ @@гV$unitW TnW Tr@@ @@@ +@@@@@ .@@б@гV!tWTwWTx@@ @@@ =@@гV֠$unitW)T|W*T@@ @@@ J@@@@@ M@@B$@@ PW5Td @@@W8TZ@Tא [iter ~f s] applies [f] in turn to all elements of [s]. The elements of [s] are presented to [f] in increasing order with respect to the ordering over the type of the elements. WEWF R@@@@@@@W^@@@TWY@@@@@@p$foldޠW\T^W]Tb@б!fб@гΠ#eltWkTgWlTj@@ @@@ 3WmWlWlWmWmWmWmWm@<@A@@б@А#acc@ b@  W~TnWTr@@А#acc WTvWTz@@@@@  @@@@@ !@@б@гϠ!tWTWT@@ @@@ *@@б$initА#acc*2WTWT@@А#acc08WTWT@@55@@ =WT@@@@@ A@@T+@@ DWTd @@@WTZ@UW [fold ~f s init] computes [(f xN ... (f x2 (f x1 init))...)], where [x1 ... xN] are the elements of [s], in increasing order. WW*@@@@@@@W@@@UgWِ@@@@@@dWW搠? {1:transforming Transforming} W,2W,V@@@@@@3WWWWWWWW@v1@A#mapߠWXbWXe@б!fб@г a#eltWXjWXm@@ @@@ @@г n#eltX XqX Xt@@ @@@ +@@@@@ .@@б@г W!tXXyXXz@@ @@@ =@@г d!tX*X~X+X@@ @@@ J@@@@@ M@@B$@@ PX6Xg @@@X9X^@Uؐ  [map ~f s] is the set whose elements are [f a0],[f a1]... [f aN], where [a0],[a1]...[aN] are the elements of [s]. The elements are passed to [f] in increasing order with respect to the ordering over the type of the elements. If no element of [s] is changed by [f], [s] is returned unchanged. (If each output of [f] is physically equal to its input, the returned set is physically equal to [s].) @since 4.04 XFXGSk@@@@@@@X_@@@UXZ@@@@@@p&filterX]mwX^m}@б!fб@г Ϡ#eltXlmXmm@@ @@@ 3XnXmXmXnXnXnXnXn@<@A@@гX9$boolX{mX|m@@ @@@ @@@@@ @@б@г Ǡ!tXmXm@@ @@@ !!@@г Ԡ!tXmXm@@ @@@ ".@@@@@ #1@@D$@@ $4Xm @@@Xms@VH ( [filter ~f s] returns the set of all elements in [s] that satisfy predicate [f]. If [f] satisfies every element in [s], [s] is returned unchanged (the result of the function is then physically equal to [s]). @before 4.03 Physical equality was not ensured.XX@@@@@@@X@@@VXXʐ@@@@@@T*filter_mapXX@б!fб@г ?#eltXX@@ @@@ %3XXXXXXXX@q<@A@@гXJ&optionXX@г X#eltXX@@ @@@ &@@@@@@ ( @@@$@@ )!'@@б@г F!tY Y @@ @@@ *0@@г S!tYY@@ @@@ +=@@@@@ ,@@@S$@@ -CY% @@@Y(@Vǐ  [filter_map ~f s] returns the set of all [v] such that [f x = Some v] for some element [x] of [s]. For example, {[filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s]} is the set of halves of the even elements of [s]. If no element of [s] is changed or dropped by [f] (if [f x = Some x] for each element [x]), then [s] is returned unchanged: the result of the function is then physically equal to [s]. @since 4.11 Y5 Y6@@@@@@@YN@@@VYI@@@@@@c)partitionYL&YM/@б!fб@г #eltY[4Y\7@@ @@@ .3Y]Y\Y\Y]Y]Y]Y]Y]@<@A@@гY($boolYj;Yk?@@ @@@ /@@@@@ 0@@б@г !tY|DY}E@@ @@@ 1!@@В@г Ǡ!tYIYJ@@ @@@ 22@@@г ֠!tYMYN@@ @@@ 3A@@@@@ @@ 4H @@@- @@ 5K0@@^>@@ 6NY1@@@Y"@WQ [partition ~f s] returns a pair of sets [(s1, s2)], where [s1] is the set of all the elements of [s] that satisfy the predicate [f], and [s2] is the set of all the elements of [s] that do not satisfy [f]. YOUYF@@@@@@@Y@@&@WaYӐ@@@@@@n%splitYHRYHW@б@г D#eltYHYYH\@@ @@@ 73YYYYYYYY@8@A@@б@г ,!tYH`YHa@@ @@@ 8@@В@г =!tZHeZHf@@ @@@ 9"@@@гYР$boolZHiZHm@@ @@@ :1@@@г [!tZ!HpZ"Hq@@ @@@ ;@@@@@&@@ @@ <I-@@@> @@ =LA@@@R@@ >OU@@@Z8HN@Wא m [split x s] returns a triple [(l, present, r)], where [l] is the set of elements of [s] that are strictly less than [x]; [r] is the set of elements of [s] that are strictly greater than [x]; [present] is [false] if [s] contains no element equal to [x], or [true] if [s] contains an element equal to [x]. ZErxZF«@@@@@@@Z^@@'@WZY@@@@@@nZgZf + {1:predicates Predicates and comparisons} ZcZd"@@@@@@3ZbZaZaZbZbZbZbZb@1@A(is_emptyZo$.Zp$6@б@г !tZz$8Z{$9@@ @@@ ?@@гZE$boolZ$=Z$A@@ @@@ @'@@@@@ A*@@@Z$* @X1 % Test whether a set is empty or not. ZBHZBr@@@@@@@Z@@@XAZ@@@@@@I#memZt~ZtÁ@б@г $#eltZtÃZtÆ@@ @@@ B3ZZZZZZZZ@b]8@A@@б@г !tZtÊZtË@@ @@@ C@@гZ$boolZtÏZtÓ@@ @@@ D@@@@@ E!@@@'@@ F$* @@@Ztz@X 5 [mem x s] tests whether [x] belongs to the set [s]. ZÔÚZÔ@@@@@@@[@@@X[@@@@@@C%equal[[@б@г V!t[[@@ @@@ G3[[[[[[[[@\q8@A@@б@г g!t[-[.@@ @@@ H@@гZ$bool[:[;@@ @@@ I@@@@@ J!@@@'@@ K$* @@@[H@X琠 j [equal s1 s2] tests whether the sets [s1] and [s2] are equal, that is, contain equal elements. [U[V7k@@@@@@@[n@@@X[i@@@@@@C'compare[lmw[mm~@б@г !t[wmĀ[xmā@@ @@@ L3[y[x[x[y[y[y[y[y@\q8@A@@б@г  !t[mą[mĆ@@ @@@ M@@г[h#int[mĊ[mč@@ @@@ N@@@@@ O!@@@'@@ P$* @@@[ms@YB e Total ordering between sets. Can be used as the ordering function for doing sets of sets. [ĎĔ[@@@@@@@[@@@YR[Đ@@@@@@C&subset[ [@б@г !t[[@@ @@@ Q3[[[[[[[[@\q8@A@@б@г !t[[@@ @@@ R@@г[$bool[[ @@ @@@ S@@@@@ T!@@@'@@ U$* @@@[@Y R [subset s1 s2] tests whether the set [s1] is a subset of the set [s2]. \ !'\ d~@@@@@@@\$@@@Y\@@@@@@C'for_all\"ŀŊ\#ŀő@б!fб@г #elt\1ŀŖ\2ŀř@@ @@@ V3\3\2\2\3\3\3\3\3@`u<@A@@г[$bool\@ŀŝ\Aŀš@@ @@@ W@@@@@ X@@б@г !t\RŀŦ\Sŀŧ@@ @@@ Y!@@г\$bool\_ŀū\`ŀů@@ @@@ Z.@@@@@ [1@@D$@@ \4\kŀœ @@@\nŀņ@Z W [for_all ~f s] checks if all elements of the set satisfy the predicate [f]. \{ŰŶ\|@@@@@@@\@@@Z\@@@@@@T&exists\ \ $@б!fб@г#elt\ )\ ,@@ @@@ ]3\\\\\\\\@q<@A@@г\n$bool\ 0\ 4@@ @@@ ^@@@@@ _@@б@г !t\ 9\ :@@ @@@ `!@@г\$bool\ >\ B@@ @@@ a.@@@@@ b1@@D$@@ c4\ & @@@\ @Z} ` [exists ~f s] checks if at least one element of the set satisfies the predicate [f]. \ CI\ }Ʈ@@@@@@@]@@@Z\@@@@@@T] ] ; {1:converting Converting} ]  ưƶ]  ư@@@@@@3]]]]]]]]@f1@A'to_list]]@б@гZ!t] ]!@@ @@@ d@@г\$list]-].@г#elt]7]8@@ @@@ e1@@@@@@ g6 @@@"@@ h9%@@@]G@Z搠 6 [to_list s] is {!elements}[ s]. @since 5.1 ]T]U$;@@@@@@@]m@@*@Z]h@@@@@@X'of_list]k=G]l=N@б@г\$list]v=T]w=X@г㠐#elt]=P]=S@@ @@@ i3]]]]]]]]@{vB@A@@@ @@@ k @@гΠ!t]=\]=]@@ @@@ l@@@@@ m@@@]=C @[> [of_list l] creates a set from a list of elements. This is usually more efficient than folding [add] over the list, except perhaps for lists with many duplicated elements. @since 4.02 ]^d](@@@@@@@@]@@@[N]@@@@@@6+to_seq_from]BL]BW@б@г1#elt]BZ]B]@@ @@@ n3]]]]]]]]@On8@A@@б@г!t]Ba]Bb@@ @@@ o@@г\u#Seq!t]Bj]Bm@ ]Bn]Bo@@гb#elt]Bf^Bi@@ @@@ p1@@@ @@@ r6 @@@+@@ s9.@@@?@@ t<B@@@^BH@[ [to_seq_from x s] iterates on a subset of the elements of [s] in ascending order, from [x] or above. @since 4.07 ^pv^ @@@@@@@^8@@.@[^3@@@@@@[&to_seq^6 ^7@б@г{!t^A^B@@ @@@ u3^C^B^B^C^C^C^C^C@t8@A@@г\#Seq!t^T^U"@ ^X#^Y$@@гƠ#elt^c^d@@ @@@ v"@@@ @@@ x' @@@-@@ y*0@@@^s @\ D Iterate on the whole set, in ascending order @since 4.07 ^%+^ \t@@@@@@@^@@+@\"^@@@@@@I*to_rev_seq^"vɀ^"vɊ@б@гܠ!t^"vɍ^"vɎ@@ @@@ z3^^^^^^^^@bw8@A@@г]:#Seq!t^"vɖ^"və@ ^"vɚ^"vɛ@@г'#elt^"vɒ^"vɕ@@ @@@ {"@@@ @@@ }' @@@-@@ ~*0@@@^"v|@\s E Iterate on the whole set, in descending order @since 4.12 ^#ɜɢ^$@@@@@@@^@@+@\^@@@@@@I'add_seq^&^&@б@г]#Seq!t_&_& @ _ & _ & @@гy#elt_&_&@@ @@@ 3________@uK@A@@@" @@@  @@б@гf!t_,&_-&@@ @@@ @@гs!t_9&_:&@@ @@@ #@@@@@ &@@@&@@ )/ @@@_G&@\搠 D Add the given elements to the set, in order. @since 4.07 _T'_U(Me@@@@@@@_m@@@\_h@@@@@@H&of_seq_k*gq_l*gw@б@г]#Seq!t_z*g~_{*gʁ@ _~*gʂ_*gʃ@@г점#elt_*gz_*g}@@ @@@ 3________@tK@A@@@" @@@  @@гנ!t_*gʇ_*gʈ@@ @@@ @@@@@ @@@_*gm @]G ; Build a set from the given bindings @since 4.07 _+ʉʏ_,ʷ@@@@@@@_@@@]W_ɐ@@@@@@6@-'A@A@@p@P)@ @w@W@@l@L%@  @  w@ W !@  @  @ d =@  @  }@ ] @  @  *@  @  ?@ @B@@U@5@P@0@t@T@@i@I@@4@@w@W@@H@(@x@@3````````@z@A]3````````@@A`#2`$-@@]`5 * Output signature of the functor {!Make}. `2.`3. @@@@@@@`51@3`3`2`2`3`3`3`3`3@@A@$Makec`B0 `C0 @`[@@Т#Ordd`N0 &`O0 )@Р+OrderedType`W0 ,`X0 7@3`W`V`V`W`W`W`W`W@A@A@yd@D @@k@K@@`@@@@Y@9@  @  u@ U @  @  @ O @  @  B@ " @  W@ 7 @  [@ ;@^@>@s@S@g@4@@]@=@@=@@h@H@@B@"@r@R@@^W@@@@@@X@Aml@@УРd!S`0 <`0 =@3````````@x@@`@@A  @@A#elt`1>L`1>O@+I@;@@@A!t@@@ @@@@`1>G`1>W@@@@a@@@Aг #Ord`1>R`1>U@`1>V@@@/@@@A!ta2Xfa2Xg@+I@;@@@A_#Set$Make!t@@@%@@@@a2Xaa2Xy@@@@a4@@@Aгa*2Xja+2Xm@a.2Xna/2Xr@@#Orda52Xsa62Xv@a82Xw@"a;2Xx @!@@.m"@@$@@e;@@@A_^@@@&@@@@]@@@ZA@e;@@@A_@?>=@@@&@@@@<@@@9A@l@@@&@\ZL@=@&@@@&@@@@&@@@&@@&@@&@@@@@@&@@@&@@&@@@@@@&@-@@@&0@@@&@@&@@&@|@m@9@@@&@>@@@&A@@@&@@&@@&@B@2@#@J@@@&@O@@@&R@@@&@@&@@&@@@[@@@&@`@@@&@@@&@@&@@&@@@l@@@&@q@@@&t@@@&@@&@@&@dbT@E@}@@@&5@@@&@@&@'%@@@@@&@@@&@@@&@@&@@@@@@&@@@&@@&@@r@@@@&b@@@&@@@&@@&@IG9@*@@@@&@@@&@@&@  @@@@@&ݠ@@@&@@@&@@&@@@@@@&@@@&@@&@w@h@@@@&X@@@&@@@&@@&@?=/@ @@@@&@@@@&@@@&@@&@@&@   @ @@@@&@@@@& @@@&@@@&@@&@@&@   @ p l@ @@@& ^@@@&@@&@@@@&@@@&@@&@@&@ 5 3 %@  @!@@@& @@@&@@&@3@@@& /@@@&@@@&@@&@@&@   @  @;@@@& @@@&@@&@M@@@&F@@@&@@&@@&@ v t f@ W S@Q@@@& E@@@&~@@&}@c@@@&| ._@@@&{@@@&z@@&y@@&x@   @  @k@@@&w @@@&v@@&u@}@@@&t @@@&s@@&r@@&q@   @  @@@@&p@ r r@@&o@@&n@@@@&m T y y@@&l@@&k@@&j@ : 8 *@  @@@@&i@@@&h@@&g@@@@&f@@@&e@@&d@@&c@   @  @@@@&b @@@&a@@&`@@@@&_@@@&^@@&]@@&\@ u s e@ V R@@@@&[ D@@@&Z@@@&Y@@&X@@@@&W@@@&V@@&U@@&T@   @  @@@@&S @@@&R@@&Q@@@@&P@@@@&N@@@@&O@@&M@@&L@@&K@   @ @@@@&J@@@@&I@@@@&F@ b@@@&G@@@@&H@@&E@@&D@@&C@ > < .@ @!@@@&B@@@&A@@&@@@@#@@@&?@2@@@&>@@@&=@@&<@@&;@@@>@@@&:@C@@@&9m@@@&8@@&7@@&6@\ZL@=@O@@@&5@T@@@&4#@@@&3@@&2@@&1@@@`@@@&0@e@@@&/@@@&.@@&-@@&,@@@i@@@&+@@@&*@@&)@{@@@&(@@@&'@@&&@@&%@nl^@OK@@@@&$=@@@&#@@&"@@@@&!&@@@& @@&@@&@@@@@@&Ԡ@@@&@@@&@@&@@@@@@&@@@&@@@&@@&@sqc@T@@@@&@@@@&b:9@@@&@@@&@@&@@&@@@@@@&b@@@&@@@& @@& @@@@@@& b@@@& @@@& @@&@ywi@Z@bVU@@@&@@@&@@@@&@@@&@@&@@&@ @@b @@@&@@@&@@@%@@%@@@Z@@0:3dudtdtdududududu@@Adz0 %_@@bd \ Functor building an implementation of the set structure given a totally ordered type. d3z|d4˸@@@@@@@d0 p@q@@G3@.ua*@Z@"b6@@@@@@^@@@3dddddddd@Ig@_VjiA@baA@WV@QP@A@@76@('@@  @@@@@@@@@@@}|@ji@VU@>=@*)@@@@@@@@rq@hg@YX@JI@;:@,+@@@@@@@@@@ky@Aw3eeeeeeee@!@Ae"e6@@@e @@@c@8R@8Nc@@8H@W@R8B@@L@@ F@@@3eeeeeeee@2O@f[UA@4@@g@A@hbA@@+@ @@k2@@@`'@@@T @@@c<@@@I@@w@W @@l@@n"@ @ q %@  @  :@  @  .@  @  }@ ] $@  @  r@ R @@c/@@h@H @@9@@@L@E@=4HGA@@?A@54@/.@@@@@@@@@@@@@@xw@ji@[Z@HG@43@@@@@@@@@ml@PO@FE@76@('@@  @@@@@@@@|{@@IW@@@@@AA+Stdlib__SetA@A @@A7O+Stdlib__MapA@A7@@AG/Stdlib__HashtblA@AH @@AH@AU# a@AUo `@AUα_@@ H************************************************************************fAUUfAUa@ H f Bbbf Bb@ H OCaml fCfC@ H fDfDH@ H Jacques Garrigue, Kyoto University RIMS fEIIfEI@ H f$Ff%F@ H Copyright 2001 Institut National de Recherche en Informatique et f*Gf+G/@ H en Automatique. f0H00f1H0|@ H f6I}}f7I}@ H All rights reserved. This file is distributed under the terms of f g key data) table ]} f` * Hash tables and hash functions. Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see {!find}, {!find_opt}) is normally very fast, often faster than the equivalent lookup in {!Map}. The functors {!Make} and {!MakeSeeded} can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key. {b Warning} a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup. The polymorphic {!t} hash table is useful in simpler cases or in interactive environments. It uses the polymorphic {!hash} function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality [(=)]. See {{!examples} the examples section}. d͠>* {b Unsynchronized accesses} d * Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a {!Mutex.t}). dK8* {1 Generic interface} d= 7* The type of hash tables from type ['a] to type ['b]. c? thwart tools/sync_stdlib_docs frR  fsR  +@ z* [Hashtbl.create n] creates a new, empty hash table, with initial size greater or equal to the suggested size [n]. For best results, [n] should be on the order of the expected number of elements that will be in the table. The table grows as needed, so [n] is just an initial guess. If [n] is very small or negative then it is disregarded and a small default size is used. The optional [~random] parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of [Hashtbl.create] or deterministic over all executions. A hash table that is created with [~random] set to [false] uses a fixed hash function ({!hash}) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down. A hash table that is created with [~random] set to [true] uses the seeded hash function {!seeded_hash} with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among [2^{30}] different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using {!fold} or {!iter} is no longer deterministic: elements are enumerated in different orders at different runs of the program. If no [~random] parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling {!randomize} or by setting the [R] flag in the [OCAMLRUNPARAM] environment variable. @before 4.00 the [~random] parameter was not present and all hash tables were created in non-randomized mode. cG w* Empty a hash table. Use [reset] instead of [clear] to shrink the size of the bucket table to its initial size. b栠 j* Empty a hash table and shrink the size of the bucket table to its initial size. @since 4.00 b (* Return a copy of the given hashtable. b * [Hashtbl.add tbl ~key ~data] adds a binding of [key] to [data] in table [tbl]. {b Warning}: Previous bindings for [key] are not removed, but simply hidden. That is, after performing {!remove}[ tbl key], the previous binding for [key], if any, is restored. (Same behavior as with association lists.) If you desire the classic behavior of replacing elements, see {!replace}. a z* [Hashtbl.find tbl x] returns the current binding of [x] in [tbl], or raises [Not_found] if no such binding exists. a1 * [Hashtbl.find_opt tbl x] returns the current binding of [x] in [tbl], or [None] if no such binding exists. @since 4.05 ` * [Hashtbl.find_all tbl x] returns the list of all data associated with [x] in [tbl]. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table. `I 7* [Hashtbl.mem tbl x] checks if [x] is bound in [tbl]. _ݠ * [Hashtbl.remove tbl x] removes the current binding of [x] in [tbl], restoring the previous binding if it exists. It does nothing if [x] is not bound in [tbl]. _q 0* [Hashtbl.replace tbl ~key ~data] replaces the current binding of [key] in [tbl] by a binding of [key] to [data]. If [key] is unbound in [tbl], a binding of [key] to [data] is added to [tbl]. This is functionally equivalent to {!remove}[ tbl key] followed by {!add}[ tbl key data]. ^ g* [Hashtbl.iter ~f tbl] applies [f] to all bindings in table [tbl]. [f] receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to [f]. The order in which the bindings are passed to [f] is unspecified. However, if the table contains several bindings for the same key, they are passed to [f] in reverse order of introduction, that is, the most recent binding is passed first. If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random. The behavior is not specified if the hash table is modified by [f] during the iteration. ^b n* [Hashtbl.filter_map_inplace ~f tbl] applies [f] to all bindings in table [tbl] and update each binding depending on the result of [f]. If [f] returns [None], the binding is discarded. If it returns [Some new_val], the binding is update to associate the key to [new_val]. Other comments for {!iter} apply as well. @since 4.03 ]Ƞ * [Hashtbl.fold ~f tbl ~init] computes [(f kN dN ... (f k1 d1 init)...)], where [k1 ... kN] are the keys of all bindings in [tbl], and [d1 ... dN] are the associated values. Each binding is presented exactly once to [f]. The order in which the bindings are passed to [f] is unspecified. However, if the table contains several bindings for the same key, they are passed to [f] in reverse order of introduction, that is, the most recent binding is passed first. If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random. The behavior is not specified if the hash table is modified by [f] during the iteration. ]& * [Hashtbl.length tbl] returns the number of bindings in [tbl]. It takes constant time. Multiple bindings are counted once each, so [Hashtbl.length] gives the number of times [Hashtbl.iter] calls its first argument. \Š Y* After a call to [Hashtbl.randomize()], hash tables are created in randomized mode by default: {!create} returns randomized hash tables, unless the [~random:false] optional parameter is given. The same effect can be achieved by setting the [R] parameter in the [OCAMLRUNPARAM] environment variable. It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in {!create} call [Hashtbl.randomize()] at initialization time before any domains are created. Note that once [Hashtbl.randomize()] was called, there is no way to revert to the non-randomized default behavior of {!create}. This is intentional. Non-randomized hash tables can still be created using [Hashtbl.create ~random:false]. @since 4.00 \ ~* Return [true] if the tables are currently created in randomized mode by default, [false] otherwise. @since 4.03 \9? thwart tools/sync_stdlib_docs f,-f,-1@ * Return a copy of the given hashtable. Unlike {!copy}, {!rebuild}[ h] re-hashes all the (key, value) entries of the original table [h]. The returned hash table is randomized if [h] was randomized, or the optional [random] parameter is true, or if the default is to create randomized hash tables; see {!create} for more information. {!rebuild} can safely be used to import a hash table built by an old version of the {!Hashtbl} module, then marshaled to persistent storage. After unmarshaling, apply {!rebuild} to produce a hash table for the current version of the {!Hashtbl} module. @since 4.12 [.* @since 4.00 [ Z* Number of bindings present in the table. Same value as returned by {!length}. [ "* Number of buckets in the table. [p )* Maximal number of bindings per bucket. [Y * Histogram of bucket sizes. This array [histo] has length [max_bucket_length + 1]. The value of [histo.(i)] is the number of buckets whose size is [i]. [= * [Hashtbl.stats tbl] returns statistics about the table [tbl]: number of buckets, size of the biggest bucket, distribution of buckets by size. @since 4.00 Z' * {1 Hash tables and Sequences} Z * Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first. The behavior is not specified if the hash table is modified during the iteration. @since 4.07 Y 5* Same as [Seq.map fst (to_seq m)] @since 4.07 Y& 5* Same as [Seq.map snd (to_seq m)] @since 4.07 X F* Add the given bindings to the table, using {!add} @since 4.07 X! J* Add the given bindings to the table, using {!replace} @since 4.07 W * Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using {!replace_seq}, which means that if two pairs have the same key, only the latest one will appear in the table. @since 4.07 W;* {1 Functorial interface} V蠠 * The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins. For instance, one might want to specialize a table for integer keys: {[ module IntHash = struct type t = int let equal i j = i=j let hash i = i land max_int end module IntHashtbl = Hashtbl.Make(IntHash) let h = IntHashtbl.create 17 in IntHashtbl.add h 12 "hello" ]} This creates a new module [IntHashtbl], with a new type ['a IntHashtbl.t] of tables from [int] to ['a]. In this example, [h] contains [string] values so its type is [string IntHashtbl.t]. Note that the new type ['a IntHashtbl.t] is not compatible with the type [('a,'b) Hashtbl.t] of the generic interface. For example, [Hashtbl.length h] would not type-check, you must use [IntHashtbl.length]. Vؠ "* The type of the hashtable keys. V /* The equality predicate used to compare keys. VW * A hashing function on keys. It must be such that if two keys are equal according to [equal], then they have identical hash values as computed by [hash]. Examples: suitable ([equal], [hash]) pairs for arbitrary key types include - ([(=)], {!hash}) for comparing objects by structure (provided objects do not contain floats) - ([(fun x y -> compare x y = 0)], {!hash}) for comparing objects by structure and handling {!Stdlib.nan} correctly - ([(==)], {!hash}) for comparing objects by physical equality (e.g. for mutable or cyclic objects). V .* The input signature of the functor {!Make}. U렠.* @since 4.00 Tˠ.* @since 4.05 S".* @since 4.03 Q.* @since 4.00 O.* @since 4.07 O.* @since 4.07 O.* @since 4.07 N.* @since 4.07 N%.* @since 4.07 M.* @since 4.07 M /* The output signature of the functor {!Make}. LŠ \* Functor building an implementation of the hashtable structure. The functor [Hashtbl.Make] returns a structure containing a type [key] of keys and a type ['a t] of hash tables associating data of type ['a] to keys of type [key]. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument [H] instead of generic equality and hashing. Since the hash function is not seeded, the [create] operation of the result structure always returns non-randomized hash tables. I "* The type of the hashtable keys. IǠ /* The equality predicate used to compare keys. I. C* A seeded hashing function on keys. The first argument is the seed. It must be the case that if [equal x y] is true, then [seeded_hash seed x = seeded_hash seed y] for any value of [seed]. A suitable choice for [seeded_hash] is the function {!Hashtbl.seeded_hash} below. H֠ F* The input signature of the functor {!MakeSeeded}. @since 4.00 H? thwart tools/sync_stdlib_docs gKK1gKKT@.* @since 4.05 E頠.* @since 4.03 C۠.* @since 4.07 B].* @since 4.07 A.* @since 4.07 A.* @since 4.07 A.* @since 4.07 @q.* @since 4.07 ? G* The output signature of the functor {!MakeSeeded}. @since 4.00 ? * Functor building an implementation of the hashtable structure. The functor [Hashtbl.MakeSeeded] returns a structure containing a type [key] of keys and a type ['a t] of hash tables associating data of type ['a] to keys of type [key]. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument [H] instead of generic equality and hashing. The [create] operation of the result structure supports the [~random] optional parameter and returns randomized hash tables if [~random:true] is passed or if randomization is globally on (see {!Hashtbl.randomize}). @since 4.00 <Ǡ %* {1 The polymorphic hash functions} < * [Hashtbl.hash x] associates a nonnegative integer to any value of any type. It is guaranteed that if [x = y] or [Stdlib.compare x y = 0], then [hash x = hash y]. Moreover, [hash] always terminates, even on cyclic structures. <@ _* A variant of {!hash} that is further parameterized by an integer seed. @since 4.00 ;ꠠ G* [Hashtbl.hash_param meaningful total x] computes a hash value for [x], with the same properties as for [hash]. The two extra integer parameters [meaningful] and [total] give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure [x], stopping after [meaningful] meaningful nodes were encountered, or [total] nodes (meaningful or not) were encountered. If [total] as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of [meaningful] and [total] means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters [meaningful] and [total] govern the tradeoff between accuracy and speed. As default choices, {!hash} and {!seeded_hash} take [meaningful = 10] and [total = 100]. ; * A variant of {!hash_param} that is further parameterized by an integer seed. Usage: [Hashtbl.seeded_hash_param meaningful total seed x]. @since 4.00 ; w* {1:examples Examples} {2 Basic Example} {[ (* 0...99 *) let seq = Seq.ints 0 |> Seq.take 100 (* build from Seq.t *) # let tbl = seq |> Seq.map (fun x -> x, string_of_int x) |> Hashtbl.of_seq val tbl : (int, string) Hashtbl.t = # Hashtbl.length tbl - : int = 100 # Hashtbl.find_opt tbl 32 - : string option = Some "32" # Hashtbl.find_opt tbl 166 - : string option = None # Hashtbl.replace tbl 166 "one six six" - : unit = () # Hashtbl.find_opt tbl 166 - : string option = Some "one six six" # Hashtbl.length tbl - : int = 101 ]} {2 Counting Elements} Given a sequence of elements (here, a {!Seq.t}), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences. Here we illustrate that principle using a sequence of (ascii) characters (type [char]). We use a custom [Char_tbl] specialized for [char]. {[ # module Char_tbl = Hashtbl.Make(struct type t = char let equal = Char.equal let hash = Hashtbl.hash end) (* count distinct occurrences of chars in [seq] *) # let count_chars (seq : char Seq.t) : _ list = let counts = Char_tbl.create 16 in Seq.iter (fun c -> let count_c = Char_tbl.find_opt counts c |> Option.value ~default:0 in Char_tbl.replace counts c (count_c + 1)) seq; (* turn into a list *) Char_tbl.fold (fun c n l -> (c,n) :: l) counts [] |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2) val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = (* basic seq from a string *) # let seq = String.to_seq "hello world, and all the camels in it!" val seq : char Seq.t = # count_chars seq - : (Char.t * int) list = [(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3); ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1); ('s', 1); ('t', 2); ('w', 1)] (* "abcabcabc..." *) # let seq2 = Seq.cycle (String.to_seq "abc") |> Seq.take 31 val seq2 : char Seq.t = # String.of_seq seq2 - : String.t = "abcabcabcabcabcabcabcabcabcabca" # count_chars seq2 - : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)] ]} : * Association tables over ordered types. This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map. For instance: {[ module IntPairs = struct type t = int * int let compare (x0,y0) (x1,y1) = match Stdlib.compare x0 x1 with 0 -> Stdlib.compare y0 y1 | c -> c end module PairsMap = Map.Make(IntPairs) let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world") ]} This creates a new module [PairsMap], with a new type ['a PairsMap.t] of maps from [int * int] to ['a]. In this example, [m] contains [string] values so its type is [string PairsMap.t]. :q<* The type of the map keys. 9 * A total ordering function over the keys. This is a two-argument function [f] such that [f e1 e2] is zero if the keys [e1] and [e2] are equal, [f e1 e2] is strictly negative if [e1] is smaller than [e2], and [f e1 e2] is strictly positive if [e1] is greater than [e2]. Example: a suitable ordering function is the generic structural comparison function {!Stdlib.compare}. 8 ** Input signature of the functor {!Make}. 80* {1:maps Maps} 8|<* The type of the map keys. 8P 1* The type of maps from type [key] to type ['a]. 81* The empty map. 7Ϡ * [add ~key ~data m] returns a map containing the same bindings as [m], plus a binding of [key] to [data]. If [key] was already bound in [m] to a value that is physically equal to [data], [m] is returned unchanged (the result of the function is then physically equal to [m]). Otherwise, the previous binding of [key] in [m] disappears. @before 4.03 Physical equality was not ensured. 7Q * [add_to_list ~key ~data m] is [m] with [key] mapped to [l] such that [l] is [data :: Map.find key m] if [key] was bound in [m] and [[data]] otherwise. @since 5.1 6 u* [update ~key ~f m] returns a map containing the same bindings as [m], except for the binding of [key]. Depending on the value of [y] where [y] is [f (find_opt key m)], the binding of [key] is added, removed or updated. If [y] is [None], the binding is removed if it exists; otherwise, if [y] is [Some z] then [key] is associated to [z] in the resulting map. If [key] was already bound in [m] to a value that is physically equal to [z], [m] is returned unchanged (the result of the function is then physically equal to [m]). @since 4.06 6 s* [singleton x y] returns the one-element map that contains a binding [y] for [x]. @since 3.12 5 >* [remove x m] returns a map containing the same bindings as [m], except for [x] which is unbound in the returned map. If [x] was not in [m], [m] is returned unchanged (the result of the function is then physically equal to [m]). @before 4.03 Physical equality was not ensured. 5C * [merge ~f m1 m2] computes a map whose keys are a subset of the keys of [m1] and of [m2]. The presence of each such binding, and the corresponding value, is determined with the function [f]. In terms of the [find_opt] operation, we have [find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2)] for any key [x], provided that [f x None None = None]. @since 3.12 4a  * [union ~f m1 m2] computes a map whose keys are a subset of the keys of [m1] and of [m2]. When the same binding is defined in both arguments, the function [f] is used to combine them. This is a special case of [merge]: [union f m1 m2] is equivalent to [merge f' m1 m2], where - [f' _key None None = None] - [f' _key (Some v) None = Some v] - [f' _key None (Some v) = Some v] - [f' key (Some v1) (Some v2) = f key v1 v2] @since 4.03 3 @* Return the number of bindings of a map. @since 3.12 3T8* {1:bindings Bindings} 39 * Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering [Ord.compare], where [Ord] is the argument given to {!Map.Make}. @since 3.12 2Р * Return the binding with the smallest key in a given map (with respect to the [Ord.compare] ordering), or raise [Not_found] if the map is empty. @since 3.12 2i * Return the binding with the smallest key in the given map (with respect to the [Ord.compare] ordering), or [None] if the map is empty. @since 4.05 1 y* Same as {!min_binding}, but returns the binding with the largest key in the given map. @since 3.12 1 }* Same as {!min_binding_opt}, but returns the binding with the largest key in the given map. @since 4.05 1 * Return one binding of the given map, or raise [Not_found] if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps. @since 3.12 0 * Return one binding of the given map, or [None] if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps. @since 4.05 09:* {1:searching Searching} 0 t* [find x m] returns the current value of [x] in [m], or raises [Not_found] if no binding for [x] exists. /͠ * [find_opt x m] returns [Some v] if the current value of [x] in [m] is [v], or [None] if no binding for [x] exists. @since 4.05 /` * [find_first ~f m], where [f] is a monotonically increasing function, returns the binding of [m] with the lowest key [k] such that [f k], or raises [Not_found] if no such key exists. For example, [find_first (fun k -> Ord.compare k x >= 0) m] will return the first binding [k, v] of [m] where [Ord.compare k x >= 0] (intuitively: [k >= x]), or raise [Not_found] if [x] is greater than any element of [m]. @since 4.05 .Ӡ * [find_first_opt ~f m], where [f] is a monotonically increasing function, returns an option containing the binding of [m] with the lowest key [k] such that [f k], or [None] if no such key exists. @since 4.05 .6 * [find_last ~f m], where [f] is a monotonically decreasing function, returns the binding of [m] with the highest key [k] such that [f k], or raises [Not_found] if no such key exists. @since 4.05 - * [find_last_opt ~f m], where [f] is a monotonically decreasing function, returns an option containing the binding of [m] with the highest key [k] such that [f k], or [None] if no such key exists. @since 4.05 - <* {1:traversing Traversing} , * [iter ~f m] applies [f] to all bindings in map [m]. [f] receives the key as first argument, and the associated value as second argument. The bindings are passed to [f] in increasing order with respect to the ordering over the type of the keys. ,s * [fold ~f m ~init] computes [(f kN dN ... (f k1 d1 init)...)], where [k1 ... kN] are the keys of all bindings in [m] (in increasing order), and [d1 ... dN] are the associated data. +ؠ * {1:transforming Transforming} + ?* [map ~f m] returns a map with same domain as [m], where the associated value [a] of all bindings of [m] has been replaced by the result of the application of [f] to [a]. The bindings are passed to [f] in increasing order with respect to the ordering over the type of the keys. +Q * Same as {!map}, but the function receives as arguments both the key and the associated value for each binding of the map. *Ơ E* [filter ~f m] returns the map with all the bindings in [m] that satisfy predicate [p]. If every binding in [m] satisfies [f], [m] is returned unchanged (the result of the function is then physically equal to [m]) @since 3.12 @before 4.03 Physical equality was not ensured. *9 * [filter_map ~f m] applies the function [f] to every binding of [m], and builds a map from the results. For each binding [(k, v)] in the input map: - if [f k v] is [None] then [k] is not in the result, - if [f k v] is [Some v'] then the binding [(k, v')] is in the output map. For example, the following function on maps whose values are lists {[ filter_map (fun _k li -> match li with [] -> None | _::tl -> Some tl) m ]} drops all bindings of [m] whose value is an empty list, and pops the first element of each value that is non-empty. @since 4.11 ) * [partition ~f m] returns a pair of maps [(m1, m2)], where [m1] contains all the bindings of [m] that satisfy the predicate [f], and [m2] is the map with all the bindings of [m] that do not satisfy [f]. @since 3.12 ( * [split x m] returns a triple [(l, data, r)], where [l] is the map with all the bindings of [m] whose key is strictly less than [x]; [r] is the map with all the bindings of [m] whose key is strictly greater than [x]; [data] is [None] if [m] contains no binding for [x], or [Some v] if [m] binds [v] to [x]. @since 3.12 (H ,* {1:predicates Predicates and comparisons} (- &* Test whether a map is empty or not. '砠 _* [mem x m] returns [true] if [m] contains a binding for [x], and [false] otherwise. ' * [equal ~cmp m1 m2] tests whether the maps [m1] and [m2] are equal, that is, contain equal keys and associate them with equal data. [cmp] is the equality predicate used to compare the data associated with the keys. &ꠠ * Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps. &R r* [for_all ~f m] checks if all the bindings of the map satisfy the predicate [f]. @since 3.12 %͠ w* [exists ~f m] checks if at least one binding of the map satisfies the predicate [f]. @since 3.12 %H<* {1:converting Converting} %- 7* [to_list m] is {!bindings}[ m]. @since 5.1 $Ġ * [of_list bs] adds the bindings of [bs] to the empty map, in list order (if a key is bound twice in [bs] the last one takes over). @since 5.1 $N M* Iterate on the whole map, in ascending order of keys @since 4.07 #Ϡ N* Iterate on the whole map, in descending order of keys @since 4.12 #P * [to_seq_from k m] iterates on a subset of the bindings of [m], in ascending order of keys, from key [k] or above. @since 4.07 " E* Add the given bindings to the map, in order. @since 4.07 "& <* Build a map from the given bindings @since 4.07 ! +* Output signature of the functor {!Make}. !- ]* Functor building an implementation of the map structure given a totally ordered type.  * Sets over ordered types. This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance. The {!Make} functor constructs implementations for any type, given a [compare] function. For instance: {[ module IntPairs = struct type t = int * int let compare (x0,y0) (x1,y1) = match Stdlib.compare x0 x1 with 0 -> Stdlib.compare y0 y1 | c -> c end module PairsSet = Set.Make(IntPairs) let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13)) ]} This creates a new module [PairsSet], with a new type [PairsSet.t] of sets of [int * int].  * The type of the set elements. + * A total ordering function over the set elements. This is a two-argument function [f] such that [f e1 e2] is zero if the elements [e1] and [e2] are equal, [f e1 e2] is strictly negative if [e1] is smaller than [e2], and [f e1 e2] is strictly positive if [e1] is greater than [e2]. Example: a suitable ordering function is the generic structural comparison function {!Stdlib.compare}. Ҡ ** Input signature of the functor {!Make}. 0* {1:sets Sets}  * The type of the set elements. b4* The type of sets. <1* The empty set.  * [add x s] returns a set containing all elements of [s], plus [x]. If [x] was already in [s], [s] is returned unchanged (the result of the function is then physically equal to [s]). @before 4.03 Physical equality was not ensured.  A* [singleton x] returns the one-element set containing only [x]. h * [remove x s] returns a set containing all elements of [s], except [x]. If [x] was not in [s], [s] is returned unchanged (the result of the function is then physically equal to [s]). @before 4.03 Physical equality was not ensured. -* Set union. 4* Set intersection. ` 7* Test if two sets are disjoint. @since 4.08  ]* Set difference: [diff s1 s2] contains the elements of [s1] that are not in [s2].  ** Return the number of elements of a set. j8* {1:elements Elements} O * Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering [Ord.compare], where [Ord] is the argument given to {!Set.Make}.  * Return the smallest element of the given set (with respect to the [Ord.compare] ordering), or raise [Not_found] if the set is empty.  * Return the smallest element of the given set (with respect to the [Ord.compare] ordering), or [None] if the set is empty. @since 4.05 l R* Same as {!min_elt}, but returns the largest element of the given set. & l* Same as {!min_elt_opt}, but returns the largest element of the given set. @since 4.05 Ѡ * Return one element of the given set, or raise [Not_found] if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.  * Return one element of the given set, or [None] if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets. @since 4.05 6:* {1:searching Searching}  * [find x s] returns the element of [s] equal to [x] (according to [Ord.compare]), or raise [Not_found] if no such element exists. @since 4.01 Р * [find_opt x s] returns the element of [s] equal to [x] (according to [Ord.compare]), or [None] if no such element exists. @since 4.05 i * [find_first ~f s], where [f] is a monotonically increasing function, returns the lowest element [e] of [s] such that [f e], or raises [Not_found] if no such element exists. For example, [find_first (fun e -> Ord.compare e x >= 0) s] will return the first element [e] of [s] where [Ord.compare e x >= 0] (intuitively: [e >= x]), or raise [Not_found] if [x] is greater than any element of [s]. @since 4.05  * [find_first_opt ~f s], where [f] is a monotonically increasing function, returns an option containing the lowest element [e] of [s] such that [f e], or [None] if no such element exists. @since 4.05  * [find_last ~f s], where [f] is a monotonically decreasing function, returns the highest element [e] of [s] such that [f e], or raises [Not_found] if no such element exists. @since 4.05  * [find_last_opt ~f s], where [f] is a monotonically decreasing function, returns an option containing the highest element [e] of [s] such that [f e], or [None] if no such element exists. @since 4.05 <* {1:traversing Traversing} | * [iter ~f s] applies [f] in turn to all elements of [s]. The elements of [s] are presented to [f] in increasing order with respect to the ordering over the type of the elements.  * [fold ~f s init] computes [(f xN ... (f x2 (f x1 init))...)], where [x1 ... xN] are the elements of [s], in increasing order.  * {1:transforming Transforming}  * [map ~f s] is the set whose elements are [f a0],[f a1]... [f aN], where [a0],[a1]...[aN] are the elements of [s]. The elements are passed to [f] in increasing order with respect to the ordering over the type of the elements. If no element of [s] is changed by [f], [s] is returned unchanged. (If each output of [f] is physically equal to its input, the returned set is physically equal to [s].) @since 4.04 $ )* [filter ~f s] returns the set of all elements in [s] that satisfy predicate [f]. If [f] satisfies every element in [s], [s] is returned unchanged (the result of the function is then physically equal to [s]). @before 4.03 Physical equality was not ensured.  * [filter_map ~f s] returns the set of all [v] such that [f x = Some v] for some element [x] of [s]. For example, {[filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s]} is the set of halves of the even elements of [s]. If no element of [s] is changed or dropped by [f] (if [f x = Some x] for each element [x]), then [s] is returned unchanged: the result of the function is then physically equal to [s]. @since 4.11 ; * [partition ~f s] returns a pair of sets [(s1, s2)], where [s1] is the set of all the elements of [s] that satisfy the predicate [f], and [s2] is the set of all the elements of [s] that do not satisfy [f].  n* [split x s] returns a triple [(l, present, r)], where [l] is the set of elements of [s] that are strictly less than [x]; [r] is the set of elements of [s] that are strictly greater than [x]; [present] is [false] if [s] contains no element equal to [x], or [true] if [s] contains an element equal to [x]. 1 ,* {1:predicates Predicates and comparisons}  &* Test whether a set is empty or not.  ݠ 6* [mem x s] tests whether [x] belongs to the set [s].  k* [equal s1 s2] tests whether the sets [s1] and [s2] are equal, that is, contain equal elements.  - f* Total ordering between sets. Can be used as the ordering function for doing sets of sets.  ՠ S* [subset s1 s2] tests whether the set [s1] is a subset of the set [s2].  } X* [for_all ~f s] checks if all elements of the set satisfy the predicate [f].   a* [exists ~f s] checks if at least one element of the set satisfies the predicate [f].  <* {1:converting Converting}  7* [to_list s] is {!elements}[ s]. @since 5.1  @ * [of_list l] creates a set from a list of elements. This is usually more efficient than folding [add] over the list, except perhaps for lists with many duplicated elements. @since 4.02  렠 * [to_seq_from x s] iterates on a subset of the elements of [s] in ascending order, from [x] or above. @since 4.07  { E* Iterate on the whole set, in ascending order @since 4.07   F* Iterate on the whole set, in descending order @since 4.12  E* Add the given elements to the set, in order. @since 4.07  O <* Build a set from the given bindings @since 4.07  +* Output signature of the functor {!Make}. w ]* Functor building an implementation of the set structure given a totally ordered type. $@G)../ocamlc0-strict-sequence(-absname"-w5+a-4-9-41-42-44-45-48"-g+-warn-error"+A*-bin-annot)-nostdlib*-principal#-pp #gawk -f ./expand_module_aliases.awk"-o6stdlib__MoreLabels.cmi"-c.moreLabels.mli D/builds/workspace/precheck/flambda/false/label/ocaml-linux-32/stdlib @@0ӹ>34a_af3hhhhhhhh@h@@8CamlinternalFormatBasics0%FU(Q/Tu&Stdlib0Lku]8_٠.Stdlib__Either0Vy`u~c à/Stdlib__Hashtbl0ѱN][/!+Stdlib__Map0L5xE|O0~,J-h0U JH޼+Stdlib__Seq0nwzG&amg+Stdlib__Set0\$;7@0U JH޼A67c$c@@@@GYGIIZQQqXX@G@!6!\IhI@@"'"1@@XzX@H|H@.89e]]*@KKTT@GېH<@ Ð @ . \װe@&'@@ q E EDPHP@@@+,!8r9bzb@HBmBgg@Ɛ:j:rNN]]9@hذ>;>q@`m`a a@0t0@==pTjT@-OܐPa@UV*dcd@78@ܰ5-5t@AAGG]@X@XK@.z;(;A@@߰C;C@3Ԑ4>@@--s:ܐ;(E"E[EF@&Y&``@Q6Q@ZҐ[^@ 1 III@TİKKNNŰ^_@  АA)E)XÐX\]T@ ~ @%%s[[@@@ * #V#@UېV<@WԐX @*Ր+xffo@lͰ>V>@$%bb@+,#44;;KK̰^^$_`=@eYe@gYg@G G|@  0h$$BCST}@E E~cc@11AA°KgKo@ ([(LL@@WŐX @s@^^%@*l+JҐK$@% ST @I$Ih@@M"t"@K>KZ__@O@XY@5Q5@@ڰ:;DؐE2@01/>I>WAW@@&z&@6A6@k@TǐU8@ǐ(((@34=V=`@@ p °& &}@@@@@.K.ڰ3E3@@4*4@)B)ΰ\]s@8o8@WÐXde:@SFGw\\@^_2@0@0JK Z[@:;%RАSC@O3OZ@2|2̰ZzZ@  @::@@YY@//@W8W@`5`o@@>@ ߐ 1/@SZ4ZM@@@:@/Ȑ0YSS@@@HqHͰKKP~PbѐcB@@DِE1XݐY@gHg@7b88SSͰVOV@v°3$3@-. @**ff@@P@@