package coq-core

  1. Overview
  2. Docs
The Coq Proof Assistant -- Core Binaries and Tools

Install

Dune Dependency

Authors

Maintainers

Sources

coq-8.19.0.tar.gz
md5=64b49dbc3205477bd7517642c0b9cbb6
sha512=02fb5b4fb575af79e092492cbec6dc0d15a1d74a07f827f657a72d4e6066532630e5a6d15be4acdb73314bd40b9a321f9ea0584e0ccfe51fd3a56353bd30db9b

doc/coq-core.clib/SList/index.html

Module SListSource

Sparse lists.

Constructors
Sourcetype +'a t = private
  1. | Nil
  2. | Cons of 'a * 'a t
  3. | Default of int * 'a t
    (*

    'a t is an efficient representation of 'a option list.

    *)
Sourceval empty : 'a t

The empty list.

Sourceval cons : 'a -> 'a t -> 'a t

Isomorphic to Some x :: l.

Sourceval default : 'a t -> 'a t

Isomorphic to None :: l.

Sourceval cons_opt : 'a option -> 'a t -> 'a t

cons if Some, default otherwise

Sourceval defaultn : int -> 'a t -> 'a t

Iterated variant of default.

Destructor
Sourceval view : 'a t -> ('a option * 'a t) option
Sourceval is_empty : 'a t -> bool
Sourceval is_default : 'a t -> bool
Usual list-like operators
Sourceval length : 'a t -> int
Sourceval equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
Sourceval compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
Sourceval to_list : 'a t -> 'a option list
Sourceval of_full_list : 'a list -> 'a t
Iterators ignoring optional values
Sourcemodule Skip : sig ... end

These iterators ignore the default values in the list.

Smart iterators
Sourcemodule Smart : sig ... end

These iterators also ignore the default values in the list.

OCaml

Innovation. Community. Security.