From 7bbe047166cdcea6c2d6e933db8e9e9c6768a653 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Mon, 23 Aug 2010 13:56:55 +0100 Subject: [PATCH] Fixes a bit of broken formatting in listext.ml. Signed-off-by: Jonathan Knowles --- stdext/listext.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.5