ML-style polymorphism into C ML-style polymorphism into C Define a datatype: datatype a Tree = Leaf of a | Node of a Tree*a Tree Define a datatype: datatype a Tree = Leaf of a | Node of a Tree*a Tree Write a polymorphic function: fun reflect (t : a Tree) = case t of Leaf a => Leaf a | Node(l,r) => Node(reflect r,reflect l) Write a polymorphic function: fun reflect (t : a Tree) = case t of Leaf a => Leaf a | Node(l,r) => Node(reflect r,reflect l)
{}