package ke
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module type Sigs.FSource
val empty : 'a tAn empty queue.
val is_empty : 'a t -> boolReturn true if the given queue is empty, false otherwise.
val length : 'a t -> intNumber of elements in the queue.
val peek : 'a t -> 'a optionpeek q returns the first element in the queue q, without removing it from the queue. If q is empty, it returns None.
Get and remove the first element. If q is empty, it returns None.
Get and remove the last element. If q is empty, it returns None.
val iter : ('a -> unit) -> 'a t -> unititer f q applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.
val rev_iter : ('a -> unit) -> 'a t -> unitrev_iter f q applies f in turn to all elements of q, from the most recently entered to the least recently entered. The queue itself is unchanged.
val fold : ('acc -> 'x -> 'acc) -> 'acc -> 'x t -> 'accfold f a q is equivalent to List.fold_left f a l, where l is the list of q's elements. The queue remains unchanged.