Bill Allombert on Wed, 10 Jul 2024 18:33:31 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Docs of my()


On Tue, Jul 09, 2024 at 02:50:25PM -0700, Ilya Zakharevich wrote:
> Is there any documentation of how my(…) is actually parsed?  I can see
> that
>        my([x,y,z]=[3,4,5]);
> and
>        my(f(x)=x+1);

 f(x)= is an alias for f=x-> so it is parsed as
my(f=x->x+1)

> are actually “fulfilling the ‘best expectations’” — but not
>        my(x=y=List());

is parsed as
my(x=(y=List()))
so y is not declared as a local variable.

Cheers,
Bill