2009-02-07から1日間の記事一覧

多相バリアント

アップキャスト/ダウンキャストのメモ。 # type super = [`a | `b | `c];; type super = [ `a | `b | `c ] # type sub = [`a | `b];; type sub = [ `a | `b ] # ((`a : sub) :> super);; - : super = `a # match (`a: super) with #sub as x -> x | `c -> as…