Module Middle.Index

Types of indexing operations

type 'a t =
  1. | All
  2. | Single of 'a
  3. | Upfrom of 'a
  4. | Between of 'a * 'a
  5. | MultiIndex of 'a
val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'c) -> 'd -> 'e t -> 'f
val t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val hash_fold_t : 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> Ppx_hash_lib.Std.Hash.state -> 'a t -> Ppx_hash_lib.Std.Hash.state
val compare : 'a. ('a -> 'a -> int) -> 'a t -> 'a t -> int
val pp : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'b t -> unit
val pp_indices : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t list -> unit
val bounds : 'a t -> 'b list
val apply : default:'b -> merge:('c -> 'd -> 'e) -> ('a -> 'f) -> 'a0 t -> 'g

Apply an op over the Index types inner expressions.

  • parameter default

    Value to return for All

  • parameter merge

    Function taking in lhs and rhs of Between and merging their result.

  • parameter op

    a functor to run with inputs of inner exprs

  • parameter ind

    the Index.t to

val folder : string Core.Set.Poly.t -> (string Core.Set.Poly.t -> 'a -> string Core.Set.Poly.t) -> 'a0 t -> string Core.Set.Poly.t