package calculon

  1. Overview
  2. Docs
type key = private string
type value =
  1. | StrList of string list
  2. | Int of int
type factoid = {
  1. key : key;
  2. value : value;
}
val key_of_string : string -> key option
val factoids_of_json : Yojson.Safe.t -> (t, string) CCResult.t
val json_of_factoids : t -> Yojson.Safe.t
type op =
  1. | Get of key
  2. | Set of factoid
  3. | Set_force of factoid
  4. | Append of factoid
  5. | Remove of factoid
  6. | Incr of key
  7. | Decr of key
val parse_op : prefix:string -> string -> (op * string option) option

op + hilight

val string_of_value : value -> string
val string_of_op : op -> string
val empty : t
val mem : key -> t -> bool
val get : key -> t -> value
val set : factoid -> t -> t
val append : factoid -> t -> t
val remove : factoid -> t -> t
val incr : key -> t -> int option * t
val decr : key -> t -> int option * t
val plugin : Plugin.t
OCaml

Innovation. Community. Security.