Module IStdlib.IList
val map_changed : equal:('a -> 'a -> bool) -> f:('a -> 'a) -> 'a list -> 'a listlike map, but returns the original list if unchanged
val filter_changed : f:('a -> bool) -> 'a list -> 'a listlike filter, but returns the original list if unchanged
val remove_irrelevant_duplicates : equal:('a -> 'a -> bool) -> f:('a -> bool) -> 'a list -> 'a listRemove consecutive equal irrelevant elements from a list (according to the given comparison and relevance functions)
val merge_sorted_nodup : cmp:('a -> 'a -> int) -> res:'a list -> 'a list -> 'a list -> 'a listThe function works on sorted lists without duplicates, and keeps only one copy of elements that appear in both lists.
val inter : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a listinter cmp xs ysare the elements in bothxsandys, sorted according tocmp.
val fold_last : 'a list -> init:'b -> f:('b -> 'a -> 'b) -> f_last:('b -> 'a -> 'b) -> 'blike fold, but apply f_last to the last element
val split_last_rev : 'a list -> ('a * 'a list) optionsplit_last_rev lisSome (last, rev_prefix)wherelast :: (List.rev rev_prefix) == l,Noneiflis empty
val append_no_duplicates : cmp:('a -> 'a -> int) -> ('a list -> 'a list -> 'a list) IStdlib.IStd.Staged.tappend_no_duplicates list1 list2, assuming that list1 and list2 have no duplicates on their own, it computeslist1 @ (filtered list2), so it keeps the order of both lists and has no duplicates.
val merge_dedup : 'a list -> 'a list -> compare:('a -> 'a -> int) -> 'a listval drop : 'a list -> int -> 'a listdrop l nreturnslwithout the firstnelements, or the empty list ifn > length l.
val opt_cons : 'a option -> 'a list -> 'a listopt_cons None lreturnsl.opt_cons (Some x) lreturnsx :: l
val remove_first : 'a list -> f:('a -> bool) -> 'a list optionval force_until_first_some : 'a option lazy_t list -> 'a optionforce_until_first_some xsforces the computation of each element ofxsand returns the first that matches (Some _); or, if no such element exists, it returns None.
val eval_until_first_some : (unit -> 'a option) list -> 'a optiongiven a list of functions taking unit, evaluate and return the first one to return
Some x
val pp_print_list : max:int -> ?pp_sep:(Stdlib.Format.formatter -> unit -> unit) -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a list -> unitval fold2_result : init:'acc -> f:('acc -> 'a -> 'b -> ('acc, 'err) IStdlib.IStd.result) -> 'a list -> 'b list -> ('acc, 'err) IStdlib.IStd.result Base.List.Or_unequal_lengths.tval move_last_to_first : 'a list -> 'a listval traverse_opt : 'a list -> f:('a -> 'b option) -> 'b list optionApplies
fto the elements of the list and returnsNoneif any application results inNoneotherwise returnsSome list'.