Please use the alphabetical Index, Contents List, and your browsers search feature to find what you need.

This page generated at Thu Mar 4 08:27:10 PST 1999. This page is a sample piece of documentation generated from ml.functions.mth . For more information see the documentation on Dr. Botting's MATHS project.

Contents


    A Quick List of Functions in SML/NJ

    Note

    Use "*" to show products "><"
  1. (*)::=(><).

    Arithmetic

  2. negation::int->int="~".
  3. negation::real->real="~".
  4. max::int*int->int.
  5. min::int*int->int.
  6. abs::int->int.
  7. abs::real->real.
  8. real::int->real.
  9. truncate::real->int.
  10. ceiling::real->int.
  11. floor::real->int.
  12. sin::real->real.
  13. cos::real->real.
  14. arctan::real->real.
  15. ln::real<>->real. (partial functions, not defined on zero or less)
  16. sqrt::real<>->real. (partial functions, not defined on zero or less)
  17. exp::real->real.
  18. chr::int->string.
  19. |-chr= /ord. --- chr inverts the effect of ord.
  20. makestring::int|real->string.
  21. print::int|real->unit.

    Comparisons

  22. =:: int*int->bool = (1st) has same value as (2nd).
  23. <> :: int*int->bool = (1st) is not equal to (2nd).
  24. < :: int*int->bool.
  25. > :: int*int->bool.
  26. <= :: int*int->bool.
  27. >= :: int*int->bool.

    Strings

    The characters in strings are numbered 0,1,2,... .

  28. explode::string->string list=each char in (_) becomes item in resulting list.
  29. implode::string list->string=concatenate elements of (_).
    (IE): implode o explode = Id.
    (EI): explode o implode = Id.
  30. size::string->int=number of characters in string.
  31. substring::string*int*int->string=(3rd) chars starting at (2nd) of string (1st).
  32. ord::string->int=number in character sequence of first char of (_).
  33. ordof::string*int->int.
  34. print::string->unit.

    Boolean

  35. andalso::bool*bool->bool.
  36. orelse::bool*bool->bool.
  37. not::bool->bool.
  38. makestring::bool->string.
  39. print::bool->unit.

    Lists

  40. hd::a' list -> a' for type a'.
  41. tl::a' list->a' list for type a'.
  42. nth::'a list*int->a'.
  43. nthtail::'a list*int->a' list.
  44. null::'a list->bool.
  45. length::'a list->int.
  46. rev::'a list->'a list.
  47. map::('a -> 'b) -> 'a list -> 'b list for 'a and 'b types.

  48. app, revapp:: ('a->'b)-> 'a list -> 'b list.

  49. fold, revfold:: (('a * 'b)->'b) ->'a list ->'b -> 'b.

  50. exists::('a->bool)->'a list-> bool.

    Arrays

    Must call
  51. open Array;
  52. array::int*'a -> 'a array.
  53. sub::'a array*int->'a.
  54. update::'a array * int * 'a -> 'a array.
  55. length::'a array->int.
  56. arrayoflist::'a list -> 'a array.

    References

  57. dereference::="!"::'a ref -> 'a.
  58. assignment::=":="::'a ref*'a->unit.
  59. inc::int ref->unit.
  60. dec::int ref->unit.

    Bit Strings

  61. andb,orb,xorb::int*int->int
  62. lshift,rshift::int*int->int.

    Byte arrays

  63. array::int*int->bytearray. sub, update, length as in arrays.

  64. extract::bytearray*int*int->string.

    fold, revfold.

    app,revapp.

    UNIX Based Functions

  65. use::string->unit=loads UNIX file name(_) relative to current working directory. Undefined side effects in expressions.

  66. execute::string*string list->instream*outstream=execute command with path name(1st) and arguments (2nd) and return ...??.

Formulae and Definitions in Alphabetical Order