package sexp

  1. Overview
  2. Docs
S-expression swiss knife

Install

Dune Dependency

Authors

Maintainers

Sources

sexp-v0.16.0.tar.gz
sha256=bde6acfd2814bcc38a0d3cacb42e513d8932595152dd9798419559fb0e026f4e

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.