bwd
Backward lists
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val length : 'a bwd -> int
val compare_length_with : 'a bwd -> int -> int
val nth : 'a bwd -> int -> 'a
val nth_opt : 'a bwd -> int -> 'a option
val prepend : 'a bwd -> 'a list -> 'a list
Comparison
Iterators
Note that the iteration direction is from the right to the left, in the opposite direction of the corresponding functions in List
.
val iter : ( 'a -> unit ) -> 'a bwd -> unit
val iteri : ( int -> 'a -> unit ) -> 'a bwd -> unit
val fold_left : ( 'a -> 'b -> 'a ) -> 'a -> 'b bwd -> 'a
val fold_right : ( 'a -> 'b -> 'b ) -> 'a bwd -> 'b -> 'b
Iterators on two lists
Note that the iteration direction is from the right to the left, in the opposite direction of the corresponding functions in List
.
List scanning
Note that the iteration direction is from the right to the left, in the opposite direction of the corresponding functions in List
.
val for_all : ( 'a -> bool ) -> 'a bwd -> bool
val exists : ( 'a -> bool ) -> 'a bwd -> bool
val mem : 'a -> 'a bwd -> bool
val memq : 'a -> 'a bwd -> bool
List searching
Note that the iteration direction is from the right to the left, in the opposite direction of the corresponding functions in List
.
val find : ( 'a -> bool ) -> 'a bwd -> 'a
val find_opt : ( 'a -> bool ) -> 'a bwd -> 'a option
val find_map : ( 'a -> 'b option ) -> 'a bwd -> 'b option
Lists of pairs
Backward and forward lists
val to_list : 'a bwd -> 'a list
val of_list : 'a list -> 'a bwd
Infix notation
module Infix : sig ... end
Notation inspired by Conor McBride.