1(* 2 Title: Standard Basis Library: MONO_VECTOR_SLICE signature 3 Author: David Matthews 4 Copyright David Matthews 2005 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public 8 License as published by the Free Software Foundation; either 9 version 2.1 of the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19*) 20 21(* G&R 2004 status: new. *) 22 23signature MONO_VECTOR_SLICE = 24sig 25 type vector 26 type elem 27 type slice 28 29 val length : slice -> int 30 val sub : (slice * int) -> elem 31 val full: vector -> slice 32 val slice: vector * int * int option -> slice 33 val subslice: slice * int * int option -> slice 34 val base: slice -> vector * int * int 35 val vector: slice -> vector 36 val concat: slice list -> vector 37 val isEmpty: slice -> bool 38 val getItem: slice -> (elem * slice) option 39 val appi : ((int * elem) -> unit) -> slice -> unit 40 val app : (elem -> unit) -> slice -> unit 41 val mapi : ((int * elem) -> elem) -> slice -> vector 42 val map : (elem -> elem) -> slice -> vector 43 val foldli : ((int * elem * 'a) -> 'a) -> 'a -> slice -> 'a 44 val foldri : ((int * elem * 'a) -> 'a) -> 'a -> slice -> 'a 45 val foldl : ((elem * 'a) -> 'a) -> 'a -> slice -> 'a 46 val foldr : ((elem * 'a) -> 'a) -> 'a -> slice -> 'a 47 val findi: (int * elem -> bool) -> slice -> (int * elem) option 48 val find: (elem -> bool) -> slice -> elem option 49 val exists: (elem -> bool) -> slice -> bool 50 val all: (elem -> bool) -> slice -> bool 51 val collate: (elem * elem -> order) -> slice * slice -> order 52end; 53