TFL/utils.sig
author wenzelm
Wed Nov 05 11:41:18 1997 +0100 (1997-11-05)
changeset 4145 ffb0c9670597
parent 3391 5e45dd3b64e9
permissions -rw-r--r--
adapted extend_trfunsT;
     1 (*  Title:      TFL/utils
     2     ID:         $Id$
     3     Author:     Konrad Slind, Cambridge University Computer Laboratory
     4     Copyright   1997  University of Cambridge
     5 
     6 Basic utilities
     7 *)
     8 
     9 signature Utils_sig =
    10 sig
    11   exception ERR of {module:string,func:string, mesg:string}
    12 
    13   val can   : ('a -> 'b) -> 'a -> bool
    14   val holds : ('a -> bool) -> 'a -> bool
    15   val C : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
    16 
    17   val itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
    18   val rev_itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
    19   val end_itlist : ('a -> 'a -> 'a) -> 'a list -> 'a
    20   val itlist2 :('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
    21   val pluck : ('a -> bool) -> 'a list -> 'a * 'a list
    22   val zip3 : 'a list -> 'b list -> 'c list -> ('a*'b*'c) list
    23   val take  : ('a -> 'b) -> int * 'a list -> 'b list
    24   val sort  : ('a -> 'a -> bool) -> 'a list -> 'a list
    25 
    26 end;
    27