Code tidy up for 2024 day 21.
This commit is contained in:
@@ -35,6 +35,10 @@ val memoize : ('a, 'b) Hashtbl.t -> ('a -> 'b) -> 'a -> 'b
|
||||
is used to cache results, so repeated calls with the same [value] will not
|
||||
call [f] again. *)
|
||||
|
||||
val apply_n : int -> ('a -> 'a) -> 'a -> 'a
|
||||
(** [apply_n n fn arg] is equivalent to [(fn (fn ... (fn (fn arg))))] where [fn]
|
||||
is called [n] times.*)
|
||||
|
||||
(** Module representing a pair of integers, useful for Set.Make *)
|
||||
module IntPair : sig
|
||||
type t = int * int
|
||||
|
Reference in New Issue
Block a user