package vec

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

Contains infix versions of some vector operations, as well as binding operators and extended indexing operators.

val (.![]) : ('a, [> `R ]) t -> int -> 'a

Infix version of get.

val (.?[]) : ('a, [> `R ]) t -> int -> 'a option

Infix version of try_get.

val (.![]<-) : ('a, [> `W ]) t -> int -> 'a -> unit

Infix version of set.

val (.?[]<-) : ('a, [> `W ]) t -> int -> 'a -> bool

Infix version of try_set.

val let+ : ('a, [> `R ]) t -> ('a -> 'b) -> ('b, [ `R | `W ]) t

Equivalent to map, but with the arguments flipped.

val and+ : ('a, [> `R ]) t -> ('b, [> `R ]) t -> ('a * 'b, [ `R | `W ]) t

Equivalent to cartesian_product.

val let* : ('a, [> `R ]) t -> ('a -> ('b, [> `R ]) t) -> ('b, [ `R | `W ]) t

Equivalent to flat_map, but with the arguments flipped.

val and* : ('a, [> `R ]) t -> ('b, [> `R ]) t -> ('a * 'b, [ `R | `W ]) t

Equivalent to cartesian_product.

val (@) : ('a, [> `R ]) t -> ('a, [> `R ]) t -> ('a, [ `R | `W ]) t

Infix version of append.

val (=|<) : ('a -> 'b) -> ('a, [> `R ]) t -> ('b, [ `R | `W ]) t

Infix version of map.

val (>|=) : ('a, [> `R ]) t -> ('a -> 'b) -> ('b, [ `R | `W ]) t

Infix version of map, with the arguments flipped.

val (<$>) : ('a -> 'b) -> ('a, [> `R ]) t -> ('b, [ `R | `W ]) t

Infix version of map.

val (<*>) : ('a -> 'b, [> `R ]) t -> ('a, [> `R ]) t -> ('b, [ `R | `W ]) t

Infix version of apply.

val (=<<) : ('a -> ('b, [> `R ]) t) -> ('a, [> `R ]) t -> ('b, [ `R | `W ]) t

Infix version of flat_map.

val (>>=) : ('a, [> `R ]) t -> ('a -> ('b, [> `R ]) t) -> ('b, [ `R | `W ]) t

Infix version of flat_map, with the arguments flipped.

val (--) : int -> int -> (int, [ `R | `W ]) t

Infix version of range.

OCaml

Innovation. Community. Security.