Gergely Buday wrote:
I would be glad to see a working example of 'make', creating a variant
value, and using 'match' on it.

Here's a simple one:

type t = variant [A = int, B = float]

val a = make [#A] 1
val b = make [#B] 2.3

fun f (x : t) : string = match x {A = show, B = show}

val a' = f a
val b' = f b

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to