2017年11月22日

synonyms

摘要: type_synonym string ="char list" datatype 'a tree = Tip | Node "'a tree" 'a "'a tree" fun mirror :: " 'a tree ⇒ 'a tree" where"mirror Tip = Tip"|" mir 阅读全文

posted @ 2017-11-22 21:54 apple平哥 阅读(479) 评论(0) 推荐(0) 编辑

predefined list

摘要: [] is Nil x # xs is Cons x xs [x1,...xn ] is x1#....#xn#[] xs@ys is app xs ys fun length::" 'a list =>nat" where "length Nil = 0"|"length (Cons x xs) 阅读全文

posted @ 2017-11-22 21:18 apple平哥 阅读(71) 评论(0) 推荐(0) 编辑

Toylist

摘要: theory Toylist imports Mainbegindeclare [[names_short]]no_notation Nil ("[]") and Cons (infixr "#" 65) and append (infixr "@" 65)datatype 'a list = Ni 阅读全文

posted @ 2017-11-22 20:52 apple平哥 阅读(93) 评论(0) 推荐(0) 编辑

types

摘要: declare [[names_short]] datatype bool = True|False (if b then t1 else t2) (let x = t in u) (case t of pat1=>t1|...|patn=>tn) A1=>A2=>A3=>...=>An=>A <= 阅读全文

posted @ 2017-11-22 20:51 apple平哥 阅读(337) 评论(0) 推荐(0) 编辑

导航