From 3d3a21a9c33758fadbd4bd7305c7575de28e7e20 Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 10 Sep 2025 17:49:59 +0200 Subject: [PATCH] update ml --- algo/ocaml/exo.ml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/algo/ocaml/exo.ml b/algo/ocaml/exo.ml index b2f5963..71d817f 100644 --- a/algo/ocaml/exo.ml +++ b/algo/ocaml/exo.ml @@ -18,3 +18,17 @@ let stammer x = abba(mirror x)*10000 + abba x;; let sec_of_time h m s = h*3600+m*60+s;; let time_to_sec s = (s/3600, s mod 3600/60, s mod 3600 mod 60);; let add_time ha ma sa hb mb sb = time_of_sec(sec_of_time ha ma sa + sec_of_time hb mb sb);; + +(*3.3*) +let min2 a b = + if a > b then b + else a;; + +let max2 a b = + if a > b then a + else b ;; + +let max3 a b c = if a>b && a>c then a else if b>c then b else c;; +let min3 a b c = if a