package core_kernel

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

Module Reversed_listSource

Sourcetype 'a t =
  1. | []
  2. | :: of 'a * 'a t

Reversed_list is constructed the same way as a list, but it needs to be reversed before it can be used. This is helpful when building up a list in reverse order to force reversal before use.

Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
Sourceval of_list_rev : 'a list -> 'a t

of_list_rev reverses the input list.

Sourceval rev : 'a t -> 'a list
Sourceval rev_append : 'a t -> 'a list -> 'a list
Sourceval rev_map : 'a t -> f:('a -> 'b) -> 'b list
Sourceval rev_filter_map : 'a t -> f:('a -> 'b option) -> 'b list
Sourceval is_empty : 'a t -> bool
Sourceval length : 'a t -> int
Sourceval mem : 'a t -> 'a -> equal:('a -> 'a -> bool) -> bool
OCaml

Innovation. Community. Security.