TFL/utils.sig
author wenzelm
Thu, 22 May 1997 11:20:41 +0200
changeset 3289 8c947c178f29
parent 3245 241838c01caf
child 3302 404fe31fd8d2
permissions -rw-r--r--
tuned;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2112
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     1
signature Utils_sig =
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     2
sig
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     3
  (* General error format and reporting mechanism *)
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     4
  exception ERR of {module:string,func:string, mesg:string}
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     5
  val Raise : exn -> 'a
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     6
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     7
  val can   : ('a -> 'b) -> 'a -> bool
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     8
  val holds : ('a -> bool) -> 'a -> bool
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
     9
  val C : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    10
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    11
  (* Set operations *)
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    12
  val mem : ('a -> 'a -> bool) -> 'a -> 'a list -> bool
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    13
  val set_diff : ('a -> 'b -> bool) -> 'a list -> 'b list -> 'a list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    14
  val mk_set : ('a -> 'a -> bool) -> 'a list -> 'a list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    15
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    16
  val itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    17
  val rev_itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    18
  val end_itlist : ('a -> 'a -> 'a) -> 'a list -> 'a
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    19
  val itlist2 :('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    20
  val mapfilter : ('a -> 'b) -> 'a list -> 'b list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    21
  val pluck : ('a -> bool) -> 'a list -> 'a * 'a list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    22
  val front_back : 'a list -> 'a list * 'a
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    23
  val zip3 : 'a list -> 'b list -> 'c list -> ('a*'b*'c) list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    24
  val take  : ('a -> 'b) -> int * 'a list -> 'b list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    25
  val sort  : ('a -> 'a -> bool) -> 'a list -> 'a list
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    26
  val concat : string -> string -> string
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    27
  val quote : string -> string
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    28
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    29
end;
3902e9af752f Konrad Slind's TFL
paulson
parents:
diff changeset
    30