Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: dce3a446cb
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (22 sloc) 0.311 kB
import printer.(println);
variant V(Int, StringLiteralRef);
[C] ignore (c:C, ..T)
{
c();
}
[C,V when Variant?(V) ]
dispatch(c:C, v:V)
{
return ..c(*v);
}
test(m : V)
{
with ignore(3);
with s = dispatch(m);
println(s);
}
main()
{
test(V(5));
test(V(StringLiteralRef(":)")));
}
Jump to Line
Something went wrong with that request. Please try again.