2010-06-22から1日間の記事一覧
OCamlでは、特定の関数を持っている型を作ってごにょごにょする方法はいくつかあります。 (*- row多相 *) # let touch animal : unit = animal#say;; val touch : < say : unit; .. > -> unit = <fun> (*- 構造的部分型 *) # class type animal = object method s</fun>…
OCamlでは、特定の関数を持っている型を作ってごにょごにょする方法はいくつかあります。 (*- row多相 *) # let touch animal : unit = animal#say;; val touch : < say : unit; .. > -> unit = <fun> (*- 構造的部分型 *) # class type animal = object method s</fun>…