Hi,
According to LRM section 11.13,
"The let body gets expanded with the actual arguments by replacing the
formal arguments with the actual
arguments. Semantic checks are performed to verify that the expanded let
body with the actual arguments
is legal. The result of the substitution is enclosed in parentheses
(...) so as to preserve the priority of evaluation
of the let body. Recursive let instantiations are not permitted."
So, it is clear that
(1) let myxor(a, b) = myxor(a) + myxor(b);
is illegal since it is having same let instantiation in its body.
Now if there is a case where a let is defined as,
(2) let myxor(a, b) = a + b;
, and for a let instantiation like
assign x = myxor( myxor(a) , myxor(b) );
Will it be expanded to :
let myxor(a, b) = myxor(a) + myxor(b);
I other words, does that mean - the instantiation becomes recursive.
According to my interpretation, when formal arguments get replaced with
the actuals in the let body, it will result in
a let defined as in (1), and hence should become recursive.
Anyone, please confirm if my understanding is correct or if I am missing
anything.
Thanks and Regards
Alok
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Mar 7 01:17:05 2012
This archive was generated by hypermail 2.1.8 : Wed Mar 07 2012 - 01:17:24 PST