Commit d79da325 authored by Armaël Guéneau's avatar Armaël Guéneau

lib/stdlib/Pervasives.ml: whitespace cleanup

parent ba725916
......@@ -16,7 +16,7 @@ external magic : 'a -> 'b = "%magic"
(************************************************************)
(** Boolean *)
let not x =
let not x =
if x then false else true
......@@ -25,7 +25,7 @@ let not x =
external ( == ) : 'a -> 'a -> bool = "%physical_eq"
let ( != ) x y =
let ( != ) x y =
not (x == y)
......@@ -40,15 +40,15 @@ external ( <= ) : 'a -> 'a -> bool = "%compare_le"
external ( >= ) : 'a -> 'a -> bool = "%compare_ge"
(* CFML does not support reasoning about polymorphic comparison
let min x y =
let min x y =
if x <= y then x else y
let max x y =
let max x y =
if x >= y then x else y
*)
let min (x:int) (y:int) =
if x <= y then x else y
let max (x:int) (y:int) =
let max (x:int) (y:int) =
if x >= y then x else y
(* Alternative to also support float
......@@ -81,7 +81,7 @@ let succ n =
let pred n =
n - 1
let abs (x:int) =
let abs (x:int) =
if x >= 0 then x else -x
......@@ -103,14 +103,14 @@ external ( asr ) : int -> int -> int = "%int_asr"
type 'a ref = { mutable contents : 'a }
let ref x =
let ref x =
{ contents = x }
let (!) r =
r.contents
let (!) r =
r.contents
let (:=) r x =
r.contents <- x
let (:=) r x =
r.contents <- x
let incr r =
r := !r + 1
......@@ -130,7 +130,7 @@ let ref_unsafe_set r x =
let fst (x,y) =
x
let snd (x,y) =
let snd (x,y) =
y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment