Source file import.ml

1
2
3
4
5
open! Core
module Attr = Ansi_kernel.Attr

let list_sum l ~f = List.fold l ~init:0 ~f:(fun a b -> a + f b)
let list_max l ~f = List.fold l ~init:0 ~f:(fun a b -> max a (f b))