Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
We have a new FBI (Fundamental Buf Interface) operator : "<:>" Unify. It matches an incoming array (for example a function's actual parameter list) with a similar array in a formal overload table. It equates constants, and cross-assigns variables, in order to determine which instance of a lambda fits best with the supplied parameter list. For example :
Table <:: ( (1, 2, &a, 3, "Hello"),
(1, 2, 4, 3, "Squishy"),
(1, &b, &a, 3, "Hello) );
Table <:> (1, &c, 42, 3, "Hello");
The best match is Table[1], therefore a gets 42, and c gets 2, and all the constants match (i.e. 1, 3, and "Hello").