Fix Archive.sublist

This commit is contained in:
Stavros Polymenis 2017-11-15 22:03:28 +00:00
parent 03be845d60
commit ce1f3e3a3b

View File

@ -84,6 +84,7 @@ module Make (Store : Store.T) = struct
let with_note archive note = Store.with_note archive.store note let with_note archive note = Store.with_note archive.store note
let sublist ~from ~n list = let sublist ~from ~n list =
List.fold_left (fun (i, elms) e -> (succ i, if i >= from && i <= n then e::elms else elms)) let aggregate_subrange (i, elms) e = succ i, if i >= from && i <= n then e::elms else elms in
List.fold_left aggregate_subrange (0, []) list |> snd
end end