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

anonymous lists



Is there a place in es for `real' anonymous lists?

At the moment, es seems to follow rc, in that any anonymous lists
(i.e., those returned by <>{ ... } or constructed by ( ... )) in any
context other than the RHS of assignment are instantly flattened.

How about changing the semantics of:

   ; foo ( a b c d )

to:

   ; anon_list = ( a b c d ) foo anon_list

and similarly with lists returned by <>{}.

One can still flatten lists explicitly with $.  I would also expect:

   ; foo $( a b c d )
   ; echo $#( a b c d )

to be the same as the current behaviour of:

   ; anon_list = ( a b c d ) foo $anon_list
   ; anon_list = ( a b c d ) echo $#anon_list

Alan.