package core

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module List.AssocSource

Sourcetype ('a, 'b) t = ('a, 'b) Base.List.Assoc.t
include Bin_prot.Binable.S2 with type ('a, 'b) t := ('a, 'b) t
Sourceval bin_size_t : ('a, 'b, ('a, 'b) t) Bin_prot.Size.sizer2
Sourceval bin_write_t : ('a, 'b, ('a, 'b) t) Bin_prot.Write.writer2
Sourceval bin_read_t : ('a, 'b, ('a, 'b) t) Bin_prot.Read.reader2
Sourceval __bin_read_t__ : ('a, 'b, int -> ('a, 'b) t) Bin_prot.Read.reader2
Sourceval bin_writer_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.writer
Sourceval bin_reader_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.reader
Sourceval bin_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.t
Sourceval compare : ('a -> 'a -> Base.Int.t) -> ('b -> 'b -> Base.Int.t) -> ('a, 'b) t -> ('a, 'b) t -> Base.Int.t
  • deprecated [since 2016-06] This does not respect the equivalence class promised by List.Assoc. Use List.compare directly if that's what you want.
include module type of struct include Base.List.Assoc end with type ('a, 'b) t := ('a, 'b) t
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
Sourceval t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> Sexplib0.Sexp.t -> ('a, 'b) t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('a, 'b) t -> Sexplib0.Sexp.t
Sourceval add : ('a, 'b) t -> equal:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t
Sourceval find : ('a, 'b) t -> equal:('a -> 'a -> bool) -> 'a -> 'b option
Sourceval find_exn : ('a, 'b) t -> equal:('a -> 'a -> bool) -> 'a -> 'b
Sourceval mem : ('a, 'b) t -> equal:('a -> 'a -> bool) -> 'a -> bool
Sourceval remove : ('a, 'b) t -> equal:('a -> 'a -> bool) -> 'a -> ('a, 'b) t
Sourceval map : ('a, 'b) t -> f:('b -> 'c) -> ('a, 'c) t
Sourceval inverse : ('a, 'b) t -> ('b, 'a) t

Bijectivity is not guaranteed because we allow a key to appear more than once.

Sourceval group : ('a * 'b) list -> equal:('a -> 'a -> bool) -> ('a, 'b list) t

Converts an association list with potential consecutive duplicate keys into an association list of (non-empty) lists with no (consecutive) duplicate keys. Any non-consecutive duplicate keys in the input will remain in the output.

Sourceval sort_and_group : ('a * 'b) list -> compare:('a -> 'a -> int) -> ('a, 'b list) t

Converts an association list with potential duplicate keys into an association list of (non-empty) lists with no duplicate keys.

OCaml

Innovation. Community. Security.