= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
ON THIS PAGE
package containers
-
containers
-
containers.data
-
containers.monomorphic
-
containers.sexp
-
containers.top
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Functional queues (fifo)
Simple implementation of functional queues
- since 1.3
type 'a printer = Format.formatter -> 'a -> unit
type 'a klist = unit -> [ `Nil | `Cons of 'a * 'a klist ]
val empty : 'a t
val is_empty : 'a t -> bool
val peek : 'a t -> 'a option
First element of the queue.
Same as pop
, but fails on empty queues.
- raises Invalid_argument
if the queue is empty.
Append two queues. Elements from the second one come after elements of the first one. Linear in the size of the second queue.
module Infix : sig ... end
val length : 'a t -> int
Number of elements in the queue (linear in time).
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val iter : ('a -> unit) -> 'a t -> unit
val to_list : 'a t -> 'a list
val of_list : 'a list -> 'a t
IO
ON THIS PAGE