関数型言語ML(SML, OCaml, etc.), Part 5at TECH関数型言語ML(SML, OCaml, etc.), Part 5
- 暇つぶし2ch595:デフォルトの名無しさん 08/10/27 10:53:31 module M : sig type nat = private int val nat_of_int : int -> nat val int_of_nat : nat -> int end = struct type nat = int let nat_of_int n = (assert (n >= 0)); n let int_of_nat n = n end