package forester

  1. Overview
  2. Docs
A tool for tending mathematical forests

Install

Dune Dependency

Authors

Maintainers

Sources

4.0.0.tar.gz
md5=e6fc311885219d11faae87be4918566d
sha512=9e262f964d36404228f3f82eab803be126be247507c774ce417ce2ef652a8a0220da3e6446f971725a8080ba98c9679fd77e87956155af19c21b2925b2195e90

doc/src/forester.core/Query.ml.html

Source file Query.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
type 'a t =
  | Author of 'a
  | Tag of 'a
  | Taxon of 'a
  | Meta of string * 'a
  | Or of 'a t list
  | And of 'a t list
  | Not of 'a t
  | True
[@@deriving show]

let rec map f =
  function
  | Author x -> Author (f x)
  | Tag x -> Tag (f x)
  | Taxon x -> Taxon (f x )
  | Meta (k, v) -> Meta (k, f v)
  | Or qs -> Or (List.map (map f) qs)
  | And qs -> And (List.map (map f) qs)
  | Not q -> Not (map f q)
  | True -> True

OCaml

Innovation. Community. Security.