<UO 55.5.0+dev0-2025-04-28/*ListLabels!tA;!a@@A"[]@@;../../stdlib/listLabels.mlihh@@*ListLabelsA@"::B@$list!B@@@@@@hh@@B@@@A.B@@@@Y@@@@@'h@@@@%@@A@&length@"!a@B@@@@#int@@@@@@CkDk.@@BC@@/compare_lengths@?!a@B@@@@@M!b@B@@@@+@@@@@@@@mnqqnnq@@lD@@3compare_length_with@i!a@B@@@@#lenK@@@P@@@@@@@@u | |u | @@E@@(is_empty@!a@B@@@@$bool@@@@@@|  |  @@F@@$cons@!a@B@@ @@@@@@@@@@@B 6 6B 6 Y@@G@@)singleton@!a@B@ @@@@@@G  G  @@H@@"hd@!a@B@@@@@@@L  L  @@I@@"tl@!a@ B@@@@ @@@@@@Q g gQ g @@J@@#nth@!a@B@ @@@ @@@@ @@@@@7V  8V  @@6K@@'nth_opt@3!a@B@@@@@@@@&optionL@@@@@@@@\]  ]]  @@[L@@#rev@X !a@#B@@@@dà @@@ @@!@yeze@@xM@@$init #lenI@@@$!f@T@@@%!a@-B@&@@'Ơ @@@)@@*@@+@h  h 8@@N@@&append!@Ǡ!a@8B@.@@@0@Ƞ@@@2ɠ@@@4@@5@@6@nn@@O@@*rev_append"@ʠ!a@CB@9@@@;@ˠ@@@=̠@@@?@@@@@A@t}}t}@@P@@&concat#@Π͠!a@MB@D@@@F@@@HϠ @@@J@@K@y$$y$H@@Q@@'flatten$@ ѠР!a@WB@N@@@P@@@RҠ @@@T@@U@2))3)N@@1R@@%equal%"eq@!a@eB@X@@@@Y@@Z@@[@AԠ@@@]@Iՠ@@@_@@@`@@a@@b@@c@cd@@bS@@'compare&#cmp@!a@sB@f@=@@@g@@h@@i@rؠ@@@k@z٠@@@mR@@@n@@o@@p@@q@@@T@@$iter'!f@!a@}B@t$unit@@@u@@v@ܠ@@@x@@@y@@z@@{@   5@@U@@%iteri(!f@@@@~@!a@B@/@@@@@@@@@@@<@@@@@@@@@@V@@#map)!f@!a@B@!b@B@@@@@@@@@@@@@@@@@W@@$mapi*!f@@@@@!a@B@!b@B@@@@@@(@@@.@@@@@@@@CkkDk@@BX@@'rev_map+!f@!a@B@!b@B@@@@Q@@@W@@@@@@@@lVVmV@@kY@@*filter_map,!f@!a@B@,!b@B@@@@@@@@@@@@@@@@@@%@@Z@@*concat_map-!f@!a@B@!b@B@@@@@@@@@@@@@@@@@@@@[@@-fold_left_map.!f@#acc@B@@!a@B@@@!b@B@@@@@@@$init@@@@@*@@@@@@@@@@@@@  @@ \@@)fold_left/!f@#acc@B@@!a@B@@@@@$init@@@@@@@@@@@3mm4m@@2]@@*fold_right0!f@!a@B@@#acc@B@@@@@@C@@@$init@@@@@@@\  ] R@@[^@@%iter21!f@!a@ B@@!b@B@@@@@@@@@q@@@@y@@@@@@@@ @@ @@ @"@@_@@$map22!f@!a@B@@!b@!B@!c@#B@@@@@@@@@@@@@@@@@@@@@@@ @@`@@(rev_map23!f@!a@3B@$@!b@5B@%!c@7B@&@@'@@(@@@@*@@@@,@@@.@@/@@0@@1@   !@@a@@*fold_left24!f@#acc@IB@8@!a@GB@9@!b@KB@:@@;@@<@@=$init@!@@@?@)@@@A*@@B@@C@@D@@E@>!o!o?!!@@=b@@+fold_right25!f@!a@[B@L@!b@_B@M@#acc@]B@N@@O@@P@@Q@V@@@S@^@@@U$init@@V@@W@@X@@Y@w""x""@@vc@@'for_all6!f@!a@iB@`@@@a@@b@@@@d@@@e@@f@@g@###$@@d@@&exists7!f@!a@sB@j @@@k@@l@@@@n@@@o@@p@@q@$$$%@@e@@(for_all28!f@!a@B@t@!b@B@u9@@@v@@w@@x@@@@z@@@@|N @@@}@@~@@@@@&&&&C@@f@@'exists29!f@!a@B@@!b@B@p @@@@@@@@ @@@@ @@@ @@@@@@@@@@3%&&4%&'@@2g@@#mem:@!a@B@#set9@@@@@@@@@@@S+''T+''@@Rh@@$memq;@!a@B@#setY@@@@@@@@@@@s0(-(-t0(-(Q@@ri@@$find!f@!a@B@(@@@@@@@@@@@@@@@@@@@@H**H**@@l@@(find_map?!f@!a@B@!b@B@@@@@@@@@@@@@@@@@@P++P+, @@m@@)find_mapi@!f@@@@@!a@B@ܠ!b@B@@@@@@@@@/@@@@@@@@@@@IW,,JW,,@@Hn@@&filterA!f@!a@B@@@@@@@V@@@\@@@@@@@@q^--r^--@@po@@(find_allB!f@!a@B@@@@@@@~ @@@!@@@@@@@@d..d..@@p@@'filteriC!f@k"@@@@!a@B@ #@@@@@@@@$@@@%@@@@@@@@h..h./#@@q@@$takeD@&@@@ @'!a@B@ @@@ ( @@@@@@@@s//s/0!@@r@@$dropE@)@@@@*!a@B@@@@+ @@@@@@@@}00}01@@s@@*take_whileF!f@!a@'B@|,@@@@@@-@@@!#.@@@#@@$@@%@811911@@7t@@*drop_whileG!f@!a@2B@(/@@@)@@*@E0@@@,K1@@@.@@/@@0@`22a22@@_u@@)partitionH!f@!a@@B@32@@@4@@5@m3@@@7@w4@@@9@5$@@@;@@<@@=@@>@3M3M3M3@@v@@-partition_map[!f@!a@ /B@A&Stdlib6&Either!t!b@ 1B@ !c@ 3B@ @@@ #@@ $@7%@@@ &@8@@@ (@9 @@@ *@@ +@@ ,@@ -@4444@@w@@%assoc\@!a@ B@ 5@@ 6@@@ 8@@ 9@@ :@ 7 7  7 70@@x@@)assoc_opt]@!a@ IB@ ?@ ;@@!b@ KB@ @@@ A@@@ CР @@@ E@@ F@@ G@ *8E8E +8E8v@@ )y@@$assq^@!a@ TB@ L@ .<@@!b@ VB@ M@@ N@@@ P@@ Q@@ R@ O99 P99@@ Nz@@(assq_opt_@!a@ aB@ W@ S=@@!b@ cB@ X@@ Y@@@ [ @@@ ]@@ ^@@ _@ y:::: z:::j@@ x{@@)mem_assoc`@!a@ mB@ d#map >@@!b@ oB@ e@@ f@@@ h?@@@ i@@ j@@ k@ :: :;@@ |@@(mem_assqa@!a@ yB@ p#map @@@!b@ {B@ q@@ r@@@ t #A@@@ u@@ v@@ w@ ;; ;;@@ }@@,remove_assocb@!a@ B@ |@ B@@!b@ B@ }@@ ~@@@  C@#@@@ @@@ @@ @@ @ <5<5 <5> >>@@ A@@$sortf#cmp@!a@ B@ @ sL@@@ @@ @@ @ M@@@  N@@@ @@ @@ @ ?? ??@@ B@@+stable_sortg#cmp@!a@ B@ @ O@@@ @@ @@ @ P@@@  Q@@@ @@ @@ @  BB  BB@@ C@@)fast_sorth#cmp@!a@ B@ @ R@@@ @@ @@ @ S@@@  T@@@ @@ @@ @ CC CD@@ D@@)sort_uniqi#cmp@!a@ B@ @ U@@@ @@ @@ @ &V@@@  ,W@@@ @@ @@ @ ADeDe BDeD@@ @E@@%mergej#cmp@!a@ B@ @ X@@@ @@ @@ @ PY@@@ @ XZ@@@  ^["@@@ @@ @@ @@ @ s EjEj t EjE@@ rF@@&to_seq@ o\!a@ B@ @@@ &Stdlib]#Seq!t@@@ @@ @ ,GDGD ,GDGd@@ G@@&of_seq@&Stdlib^#Seq!t!a@ 'B@ @@@ " _ @@@ $@@ %@ 1GG 1GG@@ H@@@30List operations.@  Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.@ n The above considerations can usually be ignored if your lists are not longer than about 10000 elements.@ J The labeled version of this module can be used as described in the )StdLabels@@( module.@@@@@@@@@@@@A;../../stdlib/listLabels.mli#,ListLabels.t3?An alias for the type of lists.@@@@@@@@@@@@ Y@ @@@$(::) ޠ @@@@A Р@  @@1ListLabels.length3 9Return the length (number of elements) of the given list.@@@@@@@@@@@@ @  @@@@ :ListLabels.compare_lengths3 "Compare the lengths of two lists. 5compare_lengths l1 l25 is equivalent to ?compare (length l1) (length l2) S, except that the computation stops after reaching the end of the shortest list.@@@@$4.05@@@@@@@ @ @! @@@@ >ListLabels.compare_length_with3 ,Compare the length of a list to an integer. 9compare_length_with l len5 is equivalent to 6compare (length l) len 5, except that the computation stops after at most #len8 iterations on the list.@@@@$4.05@@@@@@@ @D @  @@@@ 3ListLabels.is_empty3*is_empty l8 is true if and only if !l * has no elements. It is equivalent to ;compare_length_with l 0 = 0!.@@@@#5.1@@@@@@@ @g @@@@ /ListLabels.cons3)cons x xs$ is 'x :: xs@@@@$4.05@@@@@@@ @~ @ @@@@ 4ListLabels.singleton3+singleton x> returns the one-element list #[x]!.@@@@#5.4@@@@@@@ @ @@@@ -ListLabels.hd3 +Return the first element of the given list.@@@@@@@@'Failure5if the list is empty.@@@@@ @ @@@@ -ListLabels.tl3 0Return the given list without its first element.@@@@@@@@'Failure5if the list is empty.@@@@@ @ @@@@ .ListLabels.nth3+Return the !n X-th element of the given list. The first element (head of the list) is at position 0.@@@@@@@@'Failure9if the list is too short.@0Invalid_argument#if !n- is negative.@@@@@ @ @ @@@@ 2ListLabels.nth_opt3+Return the !n e-th element of the given list. The first element (head of the list) is at position 0. Return $None: if the list is too short.@@@@$4.05@@@0Invalid_argument#if !n- is negative.@@@@@ @ @ @@@@ .ListLabels.rev3.List reversal.@@@@@@@@@@@@ @* @@@@ /ListLabels.init3,init ~len ~f$ is :[f 0; f 1; ...; f (len-1)]:, evaluated left to right.@@@@$4.06@@@0Invalid_argument#if 'len < 0!.@@@@@ @  @  @@@@ 1ListLabels.append3,append l0 l1) appends "l1$ to "l0 +. Same function as the infix operator !@!.@@@@ $5.1 this function is tail-recursive.@@@@@@@ @y @| @@@@ 5ListLabels.rev_append30rev_append l1 l2* reverses "l1: and concatenates it with "l2;. This is equivalent to !(|D@) l1) @ l2!.@@@@@@@@@@@@ @ @ @@@@ 1ListLabels.concat3 Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).@@@@@@@@@@@@ @ @@@@ 2ListLabels.flatten3(Same as D@ R. Not tail-recursive (length of the argument + length of the longest sub-list).@@@@@@@@@@@@ @ @@@@ A@*Comparison@@0ListLabels.equal3 #equal eq [a1; ...; an] [b1; ..; bm] \ holds when the two input lists have the same length, and for each pair of elements "ai", "bi " at the same position we have (eq ai bi!.@/ Note: the "eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check D@+ first.@@@@$4.12@@@@@@@ @  @  @ @@@@ 2ListLabels.compare3 'compare cmp [a1; ...; an] [b1; ...; bm] T performs a lexicographic comparison of the two input lists, using the same /'a -> 'a -> int. interface as .Stdlib.compare@@!:@(a1 :: l11 is smaller than (a2 :: l2< (negative result) if "a11 is smaller than "a2 ,, or if they are equal (0 result) and "l11 is smaller than "l2@/the empty list "[] ) is strictly smaller than non-empty lists@@/ Note: the #cmp F function will be called even if the lists have different lengths.@@@@$4.12@@@@@@@ @  @k @n @@@@ ٠A@)Iterators@@/ListLabels.iter35iter ~f [a1; ...; an]2 applies function !f/ in turn to -[a1; ...; an]9. It is equivalent to 5f a1; f a2; ...; f an!.@@@@@@@@@@@@ @  @ @@@@ ߠ0ListLabels.iteri3(Same as 0D@ , but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.@@@@$4.00@@@@@@@ @  @ @@@@ ˠ.ListLabels.map34map ~f [a1; ...; an]2 applies function !f$ to +a1, ..., an9, and builds the list 1[f a1; ...; f an] ! with the results returned by !f!.@@@@@@@@@@@@ @  @ @@@@ Ϡ/ListLabels.mapi3(Same as 6D@ , but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.@@@@$4.00@@@@@@@ @  @ @@@@ 2ListLabels.rev_map3,rev_map ~f l= gives the same result as D@" (YD@% f l)8, but is more efficient.@@@@@@@@@@@@ @  @! @@@@ 5ListLabels.filter_map3/filter_map ~f l) applies !f5 to every element of !l6, filters out the $None ; elements and returns the list of the arguments of the $Some* elements.@@@@$4.08@@@@@@@ @  @P @@@@ 5ListLabels.concat_map3/concat_map ~f l> gives the same result as D@" (D@% f l)1. Tail-recursive.@@@@$4.10@@@@@@@ @  @v @@@@ 8ListLabels.fold_left_map3-fold_left_map6 is a combination of )fold_left% and #map 2 that threads an accumulator through calls to !f!.@@@@$4.11@@@@@@@ @  @  @ @@@@ 4ListLabels.fold_left3 fold_left ~f ~init [b1; ...; bn]' is !f (... (f (f init b1) b2) ...) bn!.@@@@@@@@@@@@ @  @  @ @@@@ 5ListLabels.fold_right3 !fold_right ~f [a1; ...; an] ~init' is !f a1 (f a2 (... (f an init) ...))5. Not tail-recursive.@@@@@@@@@@@@ @  @ @  @@@@ A@6Iterators on two lists@@0ListLabels.iter23 $iter2 ~f [a1; ...; an] [b1; ...; bn]2 calls in turn 5f a1 b1; ...; f an bn!.@@@@@@@@0Invalid_argument =if the two lists are determined to have different lengths.@@@@@ @  @ @  ~@@@@ u/ListLabels.map23 #map2 ~f [a1; ...; an] [b1; ...; bn]' is 7[f a1 b1; ...; f an bn]!.@@@@@@@@0Invalid_argument =if the two lists are determined to have different lengths.@@@@@ @  @* o@- j@@@@ `3ListLabels.rev_map231rev_map2 ~f l1 l2= gives the same result as D@" (6D@) f l1 l2)8, but is more efficient.@@@@@@@@@@@@ s@ s r@Q ]@T X@@@@ N5ListLabels.fold_left23 /fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn]' is *f (... (f (f init a1 b1) a2 b2) ...) an bn!.@@@@@@@@0Invalid_argument =if the two lists are determined to have different lengths.@@@@@ ^@ ^ ]@ E ^@x E@{ @@@@@ <6ListLabels.fold_right23 0fold_right2 ~f [a1; ...; an] [b1; ...; bn] ~init' is *f a1 b1 (f a2 b2 (... (f an bn init) ...))!.@@@@@@@@0Invalid_argument Qif the two lists are determined to have different lengths. Not tail-recursive.@@@@@ L@ L K@ 4@ /@ ) B@@@@ *A@-List scanning@@2ListLabels.for_all38for_all ~f [a1; ...; an] = checks if all elements of the list satisfy the predicate !f9. That is, it returns !(f a1) && (f a2) && ... && (f an)= for a non-empty list and $true6 if the list is empty.@@@@@@@@@@@@ G@ G F@ :@@@@ 11ListLabels.exists37exists ~f [a1; ...; an] G checks if at least one element of the list satisfies the predicate !f9. That is, it returns !(f a1) || (f a2) || ... || (f an)= for a non-empty list and %false6 if the list is empty.@@@@@@@@@@@@ G@ G F@ :@@@@ 13ListLabels.for_all23(Same as WD@ #, but for a two-argument predicate.@@@@@@@@0Invalid_argument =if the two lists are determined to have different lengths.@@@@@ >@ > =@ )@ $@@@@ 2ListLabels.exists23(Same as QD@ #, but for a two-argument predicate.@@@@@@@@0Invalid_argument =if the two lists are determined to have different lengths.@@@@@ (@ ( '@6 @9 @@@@ .ListLabels.mem3*mem a ~set8 is true if and only if !a> is equal to an element of #set!.@@@@@@@@@@@@ @W @  @@@@ /ListLabels.memq3(Same as *D@ X, but uses physical equality instead of structural equality to compare list elements.@@@@@@@@@@@@ @o @  @@@@ A@.List searching@@/ListLabels.find3)find ~f l ' returns the first element of the list !l ! that satisfies the predicate !f!.@@@@@@@@)Not_found $if there is no value that satisfies !f0 in the list !l!.@@@@@ '@ ' &@ @@@@ 3ListLabels.find_opt3)find ~f l ' returns the first element of the list !l ! that satisfies the predicate !f-. Returns $None % if there is no value that satisfies !f0 in the list !l!.@@@@$4.05@@@@@@@ :@ : 9@ -@@@@ $5ListLabels.find_index30find_index ~f xs) returns &Some i(, where !i 2 is the index of the first element of the list "xs0 that satisfies #f x>, if there is such an element.@/ It returns $None= if there is no such element.@@@@#5.1@@@@@@@ L@ L K@ ?@@@@ 13ListLabels.find_map3-find_map ~f l) applies !f4 to the elements of !l 8 in order, and returns the first result of the form &Some v%, or $None3 if none exist.@@@@$4.10@@@@@@@ O@ O N@I <@@@@ 34ListLabels.find_mapi3(Same as (find_map , but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.@@@@#5.1@@@@@@@ <@ < ;@c "@@@@ 1ListLabels.filter3+filter ~f l & returns all the elements of the list !l? that satisfy the predicate !f >. The order of the elements in the input list is preserved.@@@@@@@@@@@@ )@ ) (@ @@@@ 3ListLabels.find_all3(find_all5 is another name for -D@!.@@@@@@@@@@@@ @  @ @@@@ 2ListLabels.filteri3(Same as ED@ , but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.@@@@$4.11@@@@@@@ @  @ @@@@ 𠙠A@1List manipulation@@/ListLabels.take3(take n l7 returns the prefix of !l+ of length !n3, or a copy of !l$ if ,n > length l!.@% !n5 must be nonnegative.@@@@#5.3@@@0Invalid_argument#if !n- is negative.@@@@@ +@ ,@ (@@@@ /ListLabels.drop3(drop n l7 returns the suffix of !l' after !n2 elements, or "[]$ if ,n > length l!.@% !n5 must be nonnegative.@@@@#5.3@@@0Invalid_argument#if !n- is negative.@@@@@ L@G M@J I@@@@ 95ListLabels.take_while3.take_while p l + is the longest (possibly empty) prefix of !l + containing only elements that satisfy !p!.@@@@#5.3@@@@@@@ K@ K J@m >@@@@ 45ListLabels.drop_while3.drop_while p l + is the longest (possibly empty) suffix of !l 9 starting at the first element that does not satisfy !p!.@@@@#5.3@@@@@@@ F@ F E@ 9@@@@ /4ListLabels.partition3.partition ~f l9 returns a pair of lists ((l1, l2)+, where "l1 $ is the list of all the elements of !l? that satisfy the predicate !f&, and "l2 ' is the list of all the elements of !l5 that do not satisfy !f >. The order of the elements in the input list is preserved.@@@@@@@@@@@@ ]@ ] \@ P@@@@ :8ListLabels.partition_map31partition_map f l9 returns a pair of lists ((l1, l2) ! such that, for each element !x3 of the input list !l!:#if #f x$ is 'Left y1', then "y1' is in "l1%, and@#if #f x$ is (Right y2', then "y2' is in "l2!.@@ ) The output elements are included in "l1% and "l2 G in the same relative order as the corresponding input elements in !l!.@4 In particular, :partition_map (fun x -> if f x then Left x else Right x) l6 is equivalent to -partition f l!.@@@@$4.12@@@@@@@ @  @W @@@@ {A@1Association lists@@0ListLabels.assoc3)assoc a l ' returns the value associated with key !a9 in the list of pairs !l.. That is, >assoc a [ ...; (a,b); ...] = b' if %(a,b)< is the leftmost binding of !a) in list !l!.@@@@@@@@)Not_found %if there is no value associated with !a0 in the list !l!.@@@@@ @ @ @@@@ 4ListLabels.assoc_opt3-assoc_opt a l ' returns the value associated with key !a: in the list of pairs !l/. That is, 'assoc_opt a [ ...; (a,b); ...] = Some b( if %(a,b)< is the leftmost binding of !a) in list !l.. Returns $None & if there is no value associated with !a1 in the list !l!.@@@@$4.05@@@@@@@ @ @ @@@@ ˠ/ListLabels.assq3(Same as D@ O, but uses physical equality instead of structural equality to compare keys.@@@@@@@@@@@@ @  @  @@@@ 3ListLabels.assq_opt3(Same as nD@ O, but uses physical equality instead of structural equality to compare keys.@@@@$4.05@@@@@@@ @ % @ ( @@@@ 4ListLabels.mem_assoc3(Same as ӐD@4, but simply return $true= if a binding exists, and %false ( if no bindings exist for the given key.@@@@@@@@@@@@ @ I @  @@@@ 3ListLabels.mem_assq3(Same as -D@ O, but uses physical equality instead of structural equality to compare keys.@@@@@@@@@@@@ @ a @  @@@@ 7ListLabels.remove_assoc30remove_assoc a l> returns the list of pairs !l ! without the first pair with key !a , if any. Not tail-recursive.@@@@@@@@@@@@ @  @  @@@@ 6ListLabels.remove_assq3(Same as *D@ c, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.@@@@@@@@@@@@ @  @  @@@@ iA@.Lists of pairs@@0ListLabels.split3 3Transform a list of pairs into a pair of lists: =split [(a1,b1); ...; (an,bn)]$ is >([a1; ...; an], [b1; ...; bn])8. Not tail-recursive.@@@@@@@@@@@@ }@  ~@@@@ V2ListLabels.combine3 3Transform a pair of lists into a list of pairs: #combine [a1; ...; an] [b1; ...; bn]' is 7[(a1,b1); ...; (an,bn)]!.@@@@@@@@0Invalid_argument ?if the two lists have different lengths. Not tail-recursive.@@@@@ i@  j@  _@@@@ IA@'Sorting@@/ListLabels.sort3 3Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, .Stdlib.compare@@ \ is a suitable comparison function. The resulting list is sorted in increasing order. D@ | is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.@ n The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.@@@@@@@@@@@@ a@ a `@  R@@@@ H6ListLabels.stable_sort3(Same as +D@ , but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).@ n The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.@@@@@@@@@@@@ S@ S R@ ( D@@@@ :4ListLabels.fast_sort3(Same as GD@$ or +D@ +, whichever is faster on typical input.@@@@@@@@@@@@ G@ G F@ F 8@@@@ .4ListLabels.sort_uniq3(Same as eD@ Z, but also remove duplicates: if multiple elements compare equal, keep only the first.@@@@$4.03#5.4 3the element kept was not necessarily the first one.@@@@@@@@ =@ = <@ f .@@@@ $0ListLabels.merge3 #Merge two lists: Assuming that "l1% and "l2 5 are sorted according to the comparison function #cmp", 0merge ~cmp l1 l2 > will return a sorted list containing all the elements of "l1% and "l2 9. If several elements compare equal, the elements of "l1 $ will be before the elements of "l2 ?. Not tail-recursive (sum of the lengths of the arguments).@@@@@@@@@@@@ U@ U T@  F@  A@@@@ 7A@3Lists and Sequences@@1ListLabels.to_seq34Iterate on the list.@@@@$4.07@@@@@@@ A@  B@@@@ -1ListLabels.of_seq3>Create a list from a sequence.@@@@$4.07@@@@@@@ 0@  1@@@@ @@ @@A#Seq&Either@@@@@