package preface

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

An Arrow_choice is an Arrow with conditional capabilities. It is a kind of Selective in the arrow hierarchy. And an Arrow_choice is also Arrow.

Laws

To have a predictable behaviour, the instance of Arrow_choice must obey some laws.

  1. All Arrow laws
  2. left (arrow f) = arrow (f ++ id)
  3. left (f >>> g) = left f >>> left g
  4. f >>> arr Left = arr Left >>> left f
  5. left f >>> arrow (Fun.id +++ g) = arrow (Fun.id +++ g) >>> left f
  6. left (left f) >>> arrow assocsum = arrow assocsum >>> left f

Minimal definition

module type WITH_LEFT = sig ... end

Minimal definition using left operation without Arrow.

module type WITH_CHOOSE = sig ... end

Minimal definition using choose operation without Arrow.

module type WITH_LEFT_AND_CHOOSE = sig ... end

Minimal definition using choose and left without Arrow.

module type WITH_ARROW_AND_FST_AND_CHOOSE = sig ... end

Minimal definition using arrow and fst and choose.

module type WITH_ARROW_AND_FST_AND_LEFT = sig ... end

Minimal definition using arrow and fst and left.

module type WITH_ARROW_AND_SPLIT_AND_CHOOSE = sig ... end

Minimal definition using arrow and fst and choose.

module type WITH_ARROW_AND_SPLIT_AND_LEFT = sig ... end

Minimal definition using arrow and fst and left.

Structure anatomy

module type CORE = sig ... end

Basis operations.

module type OPERATION = sig ... end

Additional operations.

module type ALIAS = Arrow.ALIAS

Aliases of some operations functions.

module type INFIX = sig ... end

Infix operators.

Complete API

module type API = sig ... end

The complete interface of an Arrow_choice.

Additional references

OCaml

Innovation. Community. Security.