PreviousUpNext

14.4.19  Fifo

The standard library Fifo api defines access to basic side-effect free queues.

The Fifo api is implemented by the fifo package.

The Fifol api source code is in src/lib/src/fifo.api.

The above information is manually maintained and may contain errors.

api {    Fifo X;
    exception DEQUEUE;
    empty : Fifo(X );
    is_empty : Fifo(X ) -> Bool;
    enqueue : (Fifo(X ) , X) -> Fifo(X );
    dequeue : Fifo(X ) -> (Fifo(X ) , X);
    delete : (Fifo(X ) , (X -> Bool)) -> Fifo(X );
    head : Fifo(X ) -> X;
    peek : Fifo(X ) -> Null_Or(X );
    length : Fifo(X ) -> Int;
    contents : Fifo(X ) -> List(X );
    apply : (X -> Void) -> Fifo(X ) -> Void;
    map : (X -> Y) -> Fifo(X ) -> Fifo(Y );
    fold_left : ((X , Y) -> Y) -> Y -> Fifo(X ) -> Y;
    fold_right : ((X , Y) -> Y) -> Y -> Fifo(X ) -> Y;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext