package ocaml-solo5-cross-aarch64

  1. Overview
  2. Docs
OCaml cross-compiler to the freestanding 64-bit ARM Solo5 backend

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v1.2.0.tar.gz
md5=4d07934aea2d32b77ba1b8bb062c6594
sha512=2ec008da088f7998d024b790679605813f1954de36b999031db0b003706e67f3f13554e93fa07be00f26633ea27c2b2f9f987e8b08f85c63f956bfbc306bd620

doc/stdlib/Stdlib/Pair/index.html

Module Stdlib.PairSource

Operations on pairs.

  • since 5.4

Pairs

Sourcetype ('a, 'b) t = 'a * 'b

The type for pairs.

Sourceval make : 'a -> 'b -> 'a * 'b

make a b is the pair (a, b).

Sourceval fst : ('a * 'b) -> 'a

fst (a, b) is a.

Sourceval snd : ('a * 'b) -> 'b

snd (a, b) is b.

Sourceval swap : ('a * 'b) -> 'b * 'a

swap (a, b) is (b, a).

Iterators

Sourceval fold : ('a -> 'b -> 'c) -> ('a * 'b) -> 'c

fold f (a, b) applies f to a and b.

Sourceval map : ('a -> 'c) -> ('b -> 'd) -> ('a * 'b) -> 'c * 'd

map f g (a, b) applies f to a and g to b.

Sourceval iter : ('a -> unit) -> ('b -> unit) -> ('a * 'b) -> unit

iter f g (a, b) first applies f to a, and then g to b.

Sourceval map_fst : ('a -> 'c) -> ('a * 'b) -> 'c * 'b

map_fst f p applies f to p's first component.

Sourceval map_snd : ('b -> 'c) -> ('a * 'b) -> 'a * 'c

map_snd f p applies f to p's second component.

Predicates and comparisons

Sourceval equal : ('a -> 'a -> bool) -> ('b -> 'b -> bool) -> ('a * 'b) -> ('a * 'b) -> bool

equal eqa eqb (a1, b1) (a2, b2) is true if and only if eqa a1 a2 and eqb b1 b2 are both true.

Sourceval compare : ('a -> 'a -> int) -> ('b -> 'b -> int) -> ('a * 'b) -> ('a * 'b) -> int

compare cmpa cmpb is a total order on pairs using cmpa to compare the first component, and cmpb to compare the second component. It is implemented by a lexicographic order.