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