hack_parallel

Parallel and shared memory library
Library hack_parallel.utils
Module Hack_core . List
include module type of struct include Hack_core_list end
module UnlabeledList = Hack_core_list.UnlabeledList
module List = Hack_core_list.List
module String = Hack_core_list.String
val invalid_argf : ( 'a, unit, string, unit -> 'b ) format4 -> 'a
module T = Hack_core_list.T
include module type of struct include T end
type 'a t = 'a list
val of_list : 'a -> 'b
val range : ?stride:int -> ?start:[< `exclusive | `inclusive inclusive ] -> ?stop:[< `exclusive | `inclusive exclusive ] -> int -> int -> int list
val length : 'a list -> int
val hd_exn : 'a list -> 'a
val tl_exn : 'a list -> 'a list
val hd : 'a list -> 'b option
val tl : 'a list -> 'b list option
val nth : 'a list -> int -> 'b option
val nth_exn : 'a list -> int -> 'b
val rev_append : 'a list -> 'a list -> 'a list
val rev : 'a list -> 'b list
val unordered_append : 'a list -> 'a list -> 'a list
val rev_map : 'a list -> f:( 'a -> 'b ) -> 'b list
exception Length_mismatch of string * int * int
val check_length2 : string -> 'a list -> 'b list -> unit
val check_length3 : string -> 'a list -> 'b list -> 'c list -> unit
val iter2_exn : 'a list -> 'b list -> f:( 'a -> 'b -> unit ) -> unit
val rev_map2_exn : 'a list -> 'b list -> f:( 'a -> 'b -> 'c ) -> 'c list
val fold2_exn : 'a list -> 'b list -> init:'c -> f:( 'd -> 'a -> 'b -> 'd ) -> 'e
val for_all2_exn : 'a list -> 'b list -> f:( 'a -> 'b -> bool ) -> bool
val exists2_exn : 'a list -> 'b list -> f:( 'a -> 'b -> bool ) -> bool
val mem : ?equal:( 'a -> 'b -> bool ) -> 'b list -> 'c -> bool
val assq : 'a -> ('b * 'c) list -> 'd
val rev_filter : 'a list -> f:( 'a -> bool ) -> 'a list
val filter : 'a list -> f:( 'a -> bool ) -> 'b list
val sort : cmp:( 'a -> 'a -> int ) -> 'a list -> 'a list
val stable_sort : cmp:( 'a -> 'a -> int ) -> 'a list -> 'a list
val fast_sort : cmp:( 'a -> 'a -> int ) -> 'a list -> 'a list
val sort_uniq : cmp:( 'a -> 'a -> int ) -> 'a0 list -> 'a1 list
val find_map : 'a list -> f:( 'b -> 'c option ) -> 'd option
val find : 'a list -> f:( 'b -> bool ) -> 'c option
val find_exn : 'a list -> f:( 'a -> bool ) -> 'b
val findi : 'a list -> f:( int -> 'b -> bool ) -> (int * 'c) option
val exists : 'a list -> f:( 'a -> bool ) -> bool

changing the order of arguments on some standard List functions.

val for_all : 'a list -> f:( 'a -> bool ) -> bool
val iter : 'a list -> f:( 'a -> unit ) -> unit
val fold : 'a list -> init:'b -> f:( 'c -> 'a -> 'c ) -> 'd

For the container interface.

val fold_left : 'a list -> init:'b -> f:( 'b -> 'a -> 'b ) -> 'b
val to_array : 'a list -> 'a array
val to_list : 'a -> 'b

Tail recursive versions of standard List module

val slow_append : 'a list -> 'b list -> 'b list
val count_append : 'a list -> 'a list -> int -> 'a list
val append : 'a list -> 'a list -> 'a list
val map_slow : 'a list -> f:( 'a -> 'b ) -> 'c list
val count_map : f:( 'a -> 'b ) -> 'c list -> int -> 'd list
val map : 'a list -> f:( 'a -> 'b ) -> 'b list
val (>>|) : 'a list -> ( 'a -> 'b ) -> 'b list
val map2_exn : 'a list -> 'b list -> f:( 'a -> 'b -> 'c ) -> 'd list
val rev_map3_exn : 'a list -> 'b list -> 'c list -> f:( 'd -> 'e -> 'f -> 'g ) -> 'h list
val map3_exn : 'a list -> 'b list -> 'c list -> f:( 'a -> 'b -> 'c -> 'd ) -> 'e list
val rev_map_append : 'a list -> 'b list -> f:( 'c -> 'd ) -> 'b list
val fold_right : 'a list -> f:( 'b -> 'c -> 'd ) -> init:'e -> 'f
val unzip : ('a * 'b) list -> 'a list * 'b list
val zip_exn : 'a list -> 'b list -> ('c * 'd) list
val zip : 'a list -> 'b list -> ('a * 'b) list option

Additional list operations

val rev_mapi : 'a list -> f:( int -> 'b -> 'c ) -> 'd list
val mapi : 'a list -> f:( int -> 'a -> 'b ) -> 'c list
val iteri : 'a list -> f:( int -> 'b -> 'c ) -> unit
val foldi : 'a list -> f:( int -> 'b -> 'c -> 'd ) -> init:'e -> 'f
val filteri : 'a list -> f:( int -> 'b -> bool ) -> 'c list
val reduce : 'a list -> f:( 'b -> 'c -> 'b ) -> 'd option
val reduce_exn : 'a list -> f:( 'a -> 'a -> 'a ) -> 'b
val groupi : 'a list -> break:( int -> 'b -> 'c -> bool ) -> 'd list list
val group : 'a list -> break:( 'b -> 'c -> bool ) -> 'a list list
val concat_map : 'a list -> f:( 'b -> 'c list ) -> 'd list
val concat_mapi : 'a list -> f:( int -> 'b -> 'c list ) -> 'd list
val merge : 'a list -> 'b list -> cmp:( 'c -> 'd -> int ) -> 'b list
module Monad = Hack_core_list.Monad
module Monad_infix = Hack_core_list.Monad_infix
val ignore : 'a list -> unit list
val join : 'a list list -> 'a list
val bind : 'a list -> ( 'a -> 'b list ) -> 'b list
val (>>=) : 'a list -> ( 'a -> 'b list ) -> 'b list
val return : 'a -> 'a list
val all : 'a list list -> 'a list list
val all_ignore : unit list list -> unit list
val last_exn : 'a list -> 'b

returns final element of list

val last : 'a list -> 'b option

optionally returns final element of list

val find_consecutive_duplicate : 'a list -> equal:( 'b -> 'c -> bool ) -> ('d * 'e) option
val remove_consecutive_duplicates : 'a list -> equal:( 'b -> 'c -> bool ) -> 'd list
val dedup : ?compare:( 'a -> 'a -> int ) -> 'a list -> 'b list

returns sorted version of list with duplicates removed

val contains_dup : ?compare:( 'a -> 'a -> int ) -> 'b list -> bool
val find_a_dup : ?compare:( 'a -> 'a -> int ) -> 'a list -> 'b option
val count : 'a list -> f:( 'b -> bool ) -> int
val sum : (module Hack_commutative_group.S with type t = 'a) -> 'b list -> f:( 'c -> 'a ) -> 'd
val min_elt : 'a list -> cmp:( 'b -> 'b -> int ) -> 'b option
val max_elt : 'a list -> cmp:( 'b -> 'b -> int ) -> 'b option
val init : int -> f:( int -> 'a ) -> 'b list
val rev_filter_map : 'a list -> f:( 'b -> 'c option ) -> 'd list
val filter_map : 'a list -> f:( 'a -> 'b option ) -> 'c list
val rev_filter_mapi : 'a list -> f:( int -> 'b -> 'c option ) -> 'd list
val filter_mapi : 'a list -> f:( int -> 'a -> 'b option ) -> 'c list
val filter_opt : 'a option list -> 'a list
val partition_map : 'a list -> f:( 'b -> [< `Fst of 'c | `Snd of 'd ] ) -> 'e list * 'f list
val partition_tf : 'a list -> f:( 'b -> bool ) -> 'c list * 'd list
module Assoc = Hack_core_list.Assoc
val sub : 'a list -> pos:int -> len:int -> 'b list
val split_n : 'a list -> int -> 'a list * 'a list
val take : 'a list -> int -> 'a list
val drop : 'a list -> int -> 'a list
val split_while : 'a list -> f:( 'b -> bool ) -> 'c list * 'a list
val take_while : 'a list -> f:( 'a -> bool ) -> 'a list
val drop_while : 'a list -> f:( 'a -> bool ) -> 'a list
val cartesian_product : 'a list -> 'b list -> ('a * 'b) list
val concat : 'a list list -> 'a list
val concat_no_order : 'a list list -> 'a list
val cons : 'a -> 'b list -> 'b list
val is_empty : 'a list -> bool
val is_sorted : 'a list -> compare:( 'b -> 'c -> int ) -> bool
val is_sorted_strictly : 'a list -> compare:( 'b -> 'c -> int ) -> bool
module Infix = Hack_core_list.Infix
val compare : 'a list -> 'b list -> cmp:( 'c -> 'd -> int ) -> int
val equal : 'a list -> 'b list -> equal:( 'c -> 'd -> bool ) -> bool
val transpose : 'a list list -> 'a list list option
exception Transpose_got_lists_of_different_lengths of int list
val transpose_exn : 'a list list -> 'b list list
val intersperse : 'a list -> sep:'b -> 'c list
val replicate : num:int -> 'a -> 'b list
val fold_left_env : 'a -> 'b list -> init:'c -> f:( 'd -> 'e -> 'f -> 'g * 'h ) -> 'i * 'j
val map_env : 'a -> 'b list -> f:( 'c -> 'd -> 'e * 'f ) -> 'g * 'h list
val rev_map_env : 'a -> 'b list -> f:( 'c -> 'd -> 'e * 'f ) -> 'g * 'h list
val map2_env : 'a -> 'b list -> 'c list -> f:( 'd -> 'e -> 'f -> 'g * 'h ) -> 'i * 'j list
val for_all2 : f:( 'a -> 'b -> bool ) -> 'a list -> 'b list -> bool