From: Jonathan Knowles Date: Mon, 23 Aug 2010 12:56:55 +0000 (+0100) Subject: Fixes a bit of broken formatting in listext.ml. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7bbe047166cdcea6c2d6e933db8e9e9c6768a653;p=xcp%2Fxen-api-libs.git Fixes a bit of broken formatting in listext.ml. Signed-off-by: Jonathan Knowles --- diff --git a/stdext/listext.ml b/stdext/listext.ml index e5f42c1..ffb31a2 100644 --- a/stdext/listext.ml +++ b/stdext/listext.ml @@ -176,16 +176,16 @@ let cons a b = a :: b Con: Less robust. *) let take n list = - let rec helper i acc list = + let rec helper i acc list = if i <= 0 || list = [] then acc else helper (i-1) (List.hd list :: acc) (List.tl list) - in List.rev $ helper n [] list + in List.rev $ helper n [] list (* Thanks to sharing we only use linear space. (Roughly double the space needed for the spine of the original list) *) let rec tails = function - | [] -> [[]] - | (_::xs) as l -> l :: tails xs + | [] -> [[]] + | (_::xs) as l -> l :: tails xs let safe_hd = function | a::_ -> Some a