ttree.cd 357 Bytes
Newer Older
1
2
3
4
include "../web/xhtml-strict.cd";;

let fun f (x : Xhtml) : [ Xhtml ] =
  ttree [ x ] with <a>t -> [];;
5
6
7
8
let fun g (x : Xhtml) : [ Xhtml ] =
  ttree [ x ] with <a>t -> [ <b>t ];;


9
10
11
12
13
14
15
16
17
18
(*

type T = <a>[ <b>[] T* <b>[] ];;
type S = <a>[ <x>[] S* <x>[] ];;

let fun f (x : [ T ]) : [ S ] =
  ttree x with <b>_ -> [ <x>[] ];;

let x = f [ <a>[ <b>[] <b>[] ] ];;
*)