package ke
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Ke.Rke
Source
include Sigs.R
The type of queues containing elements of type 'a
.
Raised when peek_exn
, pop_exn
, N.keep_exn
or N.shift_exn
is applied to an empty queue.
Return a new queue, initially empty.
pop q
removes and returns the first element in queue q
. If q
is empty, it returns None
.
peek q
returns the first element in the queue q
, without removing it from the queue. If q
is empty, it returns None
.
cons q x
adds element x
at the front of the given queue q
. It returns None
if it fails.
iter 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.