package sexp

  1. Overview
  2. Docs
S-expression swiss knife

Install

dune-project
 Dependency

Authors

Maintainers

Sources

sexp-v0.15.0.tar.gz
sha256=7c0bc2f04bf7abda23ccf02ce10cf90cd9e60124736ffa6501388693f2f30ac0

doc/src/sexp.sexp_app/sexps.ml.html

Source file sexps.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
open Core

include Hash_set.Make (struct
    type t = Sexp.t =
      | Atom of string
      | List of t list
    [@@deriving compare]

    let sexp_of_t = Fn.id
    let t_of_sexp = Fn.id

    let rec hash = function
      | Atom s -> String.hash s
      | List ts -> List.fold ts ~init:(List.length ts) ~f:(fun n t -> n lxor hash t)
    ;;
  end)

(** hide optional args *)
let create () = create ()

let of_list sexps = of_list sexps
OCaml

Innovation. Community. Security.