package binsec

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Binsec_base.SequenceSource

Sourcetype 'a t

an ordered list from which we can push and pop at both sides

Sourceval empty : 'a t
Sourceval length : 'a t -> int
Sourceval append : 'a t -> 'a t -> 'a t

append a b is the equivalent of b @ a with lists

Sourceval push_front : 'a -> 'a t -> 'a t

appends an element at the front of the sequence

Sourceval push_back : 'a -> 'a t -> 'a t

appends an element at the back of the sequence

Sourceval peek_front : 'a t -> 'a option

returns the element at the front of the sequence

Sourceval peek_back : 'a t -> 'a option

returns the element at the back of the sequence

Sourceval pop_front : 'a t -> 'a t option

removes the element at the front of the sequence

Sourceval pop_back : 'a t -> 'a t option

removes the element at the back of the sequence

Sourceval map_forward : ('a -> 'b) -> 'a t -> 'b t

map, with guaranteed side effect from back to front

Sourceval map_backward : ('a -> 'b) -> 'a t -> 'b t

map, with guaranteed side effect from front to back

Sourceval iter_forward : ('a -> unit) -> 'a t -> unit

iter, with guaranteed side effect from back to front

Sourceval iter_backward : ('a -> unit) -> 'a t -> unit

iter, with guaranteed side effect from front to back

Sourceval fold_forward : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

fold from back to front

Sourceval fold_backward : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

fold from front to back

Sourceval to_seq_forward : 'a t -> 'a Seq.t

creates a Seq.t which iterates from back to front * Not intended to be particularly performant

Sourceval to_seq_backward : 'a t -> 'a Seq.t

creates a Seq.t which iterates from front to back * Not intended to be particularly performant