flâneur — a map of the web's best reading

OCaml for the Skeptical: Built-In Operators and Functions

www2.lib.uchicago.edu · 1,003 words · saved by 1 readers

The manual for the Pervasives module describes all these operators and functions (hereafter I will just say operators), so this page just tries to give some guidance and list some of the operators mostly without explanation, just by way of orientation. See the manual for details. This is by no means a complete listing! The comparison operators are polymorphic meaning they work on most built-in data types (except where it doesn't make sense; e.g. you can't (usefully) compare two functions for equality). Note however that due to the strongly-typed nature of OCaml, you can't compare two values of different types; e.g. 1 = "foo" is not false but rather a type error. Most of these operators will look familiar: =, , , >=. OCaml distinguishes between structural equality and physical equality (essentially equality of the address of an object). = is structural equality and == is physical equality. Beware: is structural not-equals while != is physical not-equals. compare is the poly

OCaml for the Skeptical: Built-In Operators and Functions content for operators.head.inc goes here --> OCaml for the Skeptical U of C Library DLDC Informal OCaml Class Built-In Operators and Functions The manual for the Pervasives module describes all these operators and functions (hereafter I will just say operators ), so this page just tries to give some guidance and list some of the operators mostly without explanation, just by way of orientation. See the manual for details. This is by no means a complete listing! Built-In Operators Comparison operators Integer operators Floating-point oper

Explore this link on the map →

related reading