以下の内容はhttps://m-hiyama-memo.hatenablog.com/entry/2023/03/01/232608より取得しました。


典型的な依存型システム利用

def FooRetType (b:Bool) : Type :=
match b with
| false => Nat
| true => String

def foo (b: Bool) : FooRetType b :=
 match b with
 | false => (1 : Nat)
 | true => "hello"
#eval foo true
#eval foo false



以上の内容はhttps://m-hiyama-memo.hatenablog.com/entry/2023/03/01/232608より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14