Commit ba33b148 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-10-24 14:29:37 by cvscast] Empty log message

Original author: cvscast
Date: 2002-10-24 14:29:37+00:00
parent 33f8f261
type Person = FPerson | MPerson;; type FPerson = <person gender='F'>[ type Person = FPerson | MPerson;;
Name Children ];; type MPerson = <person gender='M'>[ Name Children type FPerson = <person gender='F'>[Name Children ];;
];; type Children = <children>[Person*];; type Name = <name>[String];; type MPerson = <person gender='M'>[ Name Children];;
type Children = <children>[Person*];;
type Name = <name>[String];;
type Man = <man>[ Name Sons Daughters ];; type Man = <man>[ Name Sons Daughters ];;
type Woman = <woman>[ Name Sons Daughters ];; type Woman = <woman>[ Name Sons Daughters ];;
...@@ -13,5 +15,5 @@ let fun sort (MPerson -> Man ; FPerson -> Woman) ...@@ -13,5 +15,5 @@ let fun sort (MPerson -> Man ; FPerson -> Woman)
let s = map mc with (x & MPerson) -> sort x in let s = map mc with (x & MPerson) -> sort x in
let d = map fc with x -> sort x in let d = map fc with x -> sort x in
<(tag)>[ n <sons>s <daughters>d ] <(tag)>[ n <sons>s <daughters>d ]
in sort;; in sort(<person gender='F'>[ <name>["pippo"] <children>[ ]]);;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment