package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/octez-libs.test-helpers/Tezos_test_helpers/Qcheck_extra/Applicative/index.html

Module Qcheck_extra.ApplicativeSource

Applicative extends Functor with an map2 and return method, allowing us to lift functions of arbitrary arity.

We can define and+ in terms of map2 and vice versa:

let (and+) = map2 (fun x y -> (x,y))

let map2 f x y =
  let+ a = x
  and+ b = y in
  f x y

assuming

(and+) = product

and

(let+) x f = map f x .

An Applicative should satisfy:

  • Associativity: product (product x y) z = product x (product y z)
  • Identities: product (return ()) x = x = product x (return ())
Sourcemodule type S = sig ... end
OCaml

Innovation. Community. Security.