package ppx_expect_nobase
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ff2cb97c867a4bd3a0778ff0924c1cb8a82c7c531f81f2b0aa220b7c29758e40
sha512=3eae2efe081aeed87d44d46f960a66744ed6d90c78f07ba91639ff2694aea655d4b71c5865d97dd88c1681e3752b90c06c252595f67ff135fcce87c38085b81f
doc/ppx_expect_nobase.wrappers/Wrappers/Queue/index.html
Module Wrappers.QueueSource
include module type of struct include Queue end
Raised when Queue.take or Queue.peek is applied to an empty queue.
take q removes and returns the first element in queue q, or raises Empty if the queue is empty.
take_opt q removes and returns the first element in queue q, or returns None if the queue is empty.
peek q returns the first element in queue q, without removing it from the queue, or raises Empty if the queue is empty.
peek_opt q returns the first element in queue q, without removing it from the queue, or returns None if the queue is empty.
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.
fold f accu q is equivalent to List.fold_left f accu l, where l is the list of q's elements. The queue remains unchanged.
transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence iter (fun x -> add x q2) q1; clear q1, but runs in constant time.
Iterators
Iterate on the queue, in front-to-back order. The behavior is not specified if the queue is modified during the iteration.
Add the elements from a sequence to the end of the queue.