home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / int.ml < prev    next >
Encoding:
Text File  |  1993-09-24  |  242 b   |  20 lines  |  [TEXT/MPS ]

  1. (* Operations on integers *)
  2.  
  3. let min n1 n2 =
  4.   if n1 <= n2 then n1 else n2
  5. ;;
  6.  
  7. let max n1 n2 =
  8.   if n1 >= n2 then n1 else n2
  9. ;;
  10.  
  11. let abs n =
  12.   if n < 0 then -n else n
  13. ;;
  14.  
  15. let lnot n =
  16.   n lxor (-1)
  17. ;;
  18.  
  19. let string_of_int = format_int "%ld";;
  20.