123456789101112131415161718192021222324252627282930313233343536373839(**********************************************************************)(* *)(* LASCAr *)(* *)(* Copyright (c) 2017-present, Jocelyn SEROT. All rights reserved. *)(* *)(* This source code is licensed under the license found in the *)(* LICENSE file in the root directory of this source tree. *)(* *)(**********************************************************************)type('a,'b)either=Fstof'a|Sndof'b|Bothof'a*'bletflipfxy=fyxletidx=xletmaxxy=ifx>ythenxelseyletminxy=ifx<ythenxelseyletlog2x=int_of_float(log(float_of_intx)/.log2.)letreciter_fixeqfx=lety=fxinifeqyxthenxelseiter_fixeqfylettime_of_day()="today"(* let t = Unix.localtime (Unix.time ()) in *)(* Printf.sprintf "%04d-%02d-%02d at %02d:%02d:%02d" *)(* (t.Unix.tm_year+1900) (t.Unix.tm_mon+1) t.Unix.tm_mday t.Unix.tm_hour t.Unix.tm_min t.Unix.tm_sec *)letappend_filefs=letoc=open_out_gen[Open_append]0x644finPrintf.fprintfoc"%s"s;close_outoc