csci2041/repo-zhan4854/Hwk_07/intVector.ml

12 lines
234 B
OCaml
Raw Normal View History

2018-01-29 23:35:31 +00:00
open Vector
module Int_arithmetic: (Arithmetic with type t = int) = struct
type t = int
let zero = 0
let add x y = x + y
let mul x y = x * y
let str x = string_of_int x
end
module Int_vector = Make_vector (Int_arithmetic)