signature GENERAL structure General : GENERAL
An extended version of the Standard ML Basis' General structure.
All of the types and values defined in General are available unqualified in the top-level environment.
See also: Ref
Imported implicitly.
signature GENERAL = sig eqtype unit exttype exn datatype order = LESS | EQUAL | GREATER exception Bind exception Chr exception Div exception Domain exception Fail of string exception Match exception Overflow exception Size exception Span exception Subscript exception Unordered val exnName : exn -> string val exnMessage : exn -> string val inverse : order -> order val ! : 'a ref -> 'a val op := : 'a ref * 'a -> unit val op :=: : 'a ref * 'a ref -> unit val ignore : 'a -> unit val before : 'a * unit -> 'a val id : 'a -> 'a val const : 'a -> 'b -> 'a val curry : ('a * 'b -> 'c) -> ('a -> 'b -> 'c) val uncurry : ('a -> 'b -> 'c) -> ('a * 'b -> 'c) val flip : ('a * 'b -> 'c) -> ('b * 'a -> 'c) val op o : ('b -> 'c) * ('a -> 'b) -> 'a -> 'c end
Items not described here are as in the Standard ML Basis' General structure.
Indicates that two values are incomparable with respect to a partial ordering.
Returns the inverse of the argument order.
Swaps the values referred to by the references re1 and re2.
The polymorphic identity function, i.e.
id x = x
for any value x.
Creates a constant function that returns x for any application. The following equivalence holds:
const x y = x
for any values x and y.
Creates a curried function from the uncurried argument function f. The function uncurry is the inverse. The following equivalence holds:
curry f x y = f (x, y) uncurry f (x, y) = f x y
for any values x and y.
Creates a function that takes its arguments in the opposite order of function f. The following equivalence holds:
flip f (x, y) = f (y, x)
for any values x and y.