AltErgoLib.My_list
Lists utilies This modules defines some helper functions on lists
Similar to List.assoc
but use a monomorphic comparison function.
Similar to List.assoc_opt
but use a monomorphic comparison function.
Similar to List.mem_assoc
but use a monomorphic comparison function.
Similar to List.remove_assoc
but use a monomorphic comparison function.
apply f [a_1; ...; a_n]
returns a couple [f a_1; ...; f a_n], same
same such that: (1) "same" is true if and only if a_i == a_i for each i; and (2) if same is true, then the resulting list is physically equal to the argument *
similar to function apply, but the elements of the list are couples *
try_map f l
is similar to List.map f l
but the function f
may fail and the iterator shortcuts the computation.