From c27c5a102a681fbc7c89cdd10947ab585c7518f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr>
Date: Fri, 12 Apr 2019 10:28:44 +0200
Subject: [PATCH] [Eva] Partition: uses Extlib.list_first_n instead of
 reimplementing it.

---
 src/plugins/value/engine/partition.ml | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml
index 460becf5505..bf2a5e2b66c 100644
--- a/src/plugins/value/engine/partition.ml
+++ b/src/plugins/value/engine/partition.ml
@@ -426,16 +426,8 @@ struct
           end
 
         | Branch (b,max) -> fun k _x ->
-          let list_start l i =
-            let rec aux acc i = function
-              | [] -> acc
-              | _ when i <= 0 -> List.rev acc
-              | x :: l -> aux (x :: acc) (i - 1) l
-            in
-            aux [] i l
-          in
           if max > 0 then
-            { k with branches = b :: list_start k.branches (max - 1) }
+            { k with branches = b :: Extlib.list_first_n (max - 1) k.branches  }
           else if k.branches <> [] then
             { k with branches = [] }
           else
-- 
GitLab