(* Programmed by Jedidiah Barber *) (* Licensed under the Sunset License v1.0 *) module type Algebra = sig type t val zero : t val one : t val add : t -> t -> t val sub : t -> t -> t val mul : t -> t -> t val div : t -> t -> t val to_string : t -> string end module type S = sig type element type wall val empty : wall val create : dimx:int -> dimy:int -> init:element array -> wall val x_length : wall -> int val y_length : wall -> int val has_value : wall -> x:int -> y:int -> bool val get : wall -> x:int -> y:int -> element val get_opt : wall -> x:int -> y:int -> element option val last_nonzero_row : wall -> int val to_string : wall -> string val print : wall -> unit val output : Stdlib.out_channel -> wall -> unit val pp_print : Stdlib.Format.formatter -> wall -> unit end module Make: functor (A : Algebra) -> S with type element = A.t