From a412160fbb0d69011f7134aadae57a281e187fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Thu, 19 Mar 2020 11:15:17 +0100 Subject: [PATCH] [server] section builder --- src/plugins/server/doc.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/server/doc.ml b/src/plugins/server/doc.ml index f4e910c5aea..5da581570cc 100644 --- a/src/plugins/server/doc.ml +++ b/src/plugins/server/doc.ml @@ -214,9 +214,8 @@ let pp_one_page ~root ~page ~title body = with Sys_error e -> Senv.fatal "Could not open file %s for writing: %s" full_path e -let rec build contents = function - | [] -> contents - | s::sections -> build (s () :: contents) sections +(* Build section contents in reverse order *) +let build d s = List.fold_left (fun d s -> s() :: d) d s let dump ~root ?(meta=true) () = begin -- GitLab