Seq.mli 1.27 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
(******************************************************************************)
(*                                                                            *)
(*                                   Menhir                                   *)
(*                                                                            *)
(*                       François Pottier, Inria Paris                        *)
(*              Yann Régis-Gianas, PPS, Université Paris Diderot              *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the GNU General Public License version 2, as described in the    *)
(*  file LICENSE.                                                             *)
(*                                                                            *)
(******************************************************************************)

14 15 16 17 18 19 20 21 22
(* Sequences with constant time concatenation and linear-time conversion
   to an ordinary list. *)

type 'a seq

val empty: 'a seq
val singleton: 'a -> 'a seq
val append: 'a seq -> 'a seq -> 'a seq
val elements: 'a seq -> 'a list
POTTIER Francois's avatar
POTTIER Francois committed
23
val concat: 'a seq list -> 'a seq
POTTIER Francois's avatar
POTTIER Francois committed
24
val first: 'a seq -> 'a (* sequence must be nonempty *)