Jafar,

I wrote that late. More often I use alternation. I've wanted to write it that 
way but I'm not sure binding variables into a list works.   


every a | b | c := table() # for instance

It's also limited by the side effects you mentioned.  I have to be picky about 
the procedures I call.  Normally they aren't generators.


David







>________________________________
> From: Jafar Al-Gharaibeh <to.ja...@gmail.com>
>To: David Gamey <david.ga...@rogers.com> 
>Cc: Kostas Oikonomou <k...@research.att.com>; Unicon 
><unicon-group@lists.sourceforge.net> 
>Sent: Tuesday, September 3, 2013 9:56:12 PM
>Subject: Re: [Unicon-group] List comprehension
> 
>
>
>David, 
>What are the consequences of having your trick as a syntactic sugar? i.e. 
>[  ] := expr 
>Is changed to
>every ![  ] := expr
>One possible undesirable side effect would be forcing expr to generate results 
>to exhaustion.  Maybe something like 
>every ![a, b, c  ] := expr / *[a, b, c  ]
>Would fix that issue though.
>--Jafar 
>On Sep 3, 2013 8:39 PM, "David Gamey" <david.ga...@rogers.com> wrote:
>
>I vote yes!  Great suggestion.
>>
>>
>>I cheat with every ![a,b,c] := proc(...)
>>
>>
>>
>>
>>>________________________________
>>> From: Kostas Oikonomou <k...@research.att.com>
>>>To: unicon-group@lists.sourceforge.net 
>>>Sent: Tuesday, September 3, 2013 8:31:12 PM
>>>Subject: Re: [Unicon-group] List comprehension
>>> 
>>>
>>>Very nice addition!
>>>
>>>And just in case you are on the lookout for suggestions,
>>>
>>>             [a,b,c] := proc(...)
>>>
>>>would be next on my wish list.
>>>
>>>                                                         Kostas
>>>
>>>On 09/03/2013 19:06, Clinton Jeffery wrote:
>>>> Hi,
>>>>
>>>> Those of you who follow
 changes in Unicon via the SVN repository will 
>>>> find the addition of
>>>>
>>>> [: generator_expression :]
>>>>
>>>> which is equivalent to
>>>>
>>>> {__tmp := []; every put(__tmp, generator_expression); if *__tmp>0 then 
>>>> __tmp }
>>>>
>>>> Most typically I imagine this will be used in statements like
>>>>
>>>> L:= [: 1 to 10 :]
>>>>
>>>> but I am sure there are other creative uses. This being "real new", 
>>>> there may be flaws and I welcome feedback. I don't think it is cast in 
>>>> stone yet.
>>>>
>>>> Cheers,
>>>> Clint
>>>>
>>>>
>>>
>>>
>>>------------------------------------------------------------------------------
>>>Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>Discover the easy way to master current and previous Microsoft technologies
>>>and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>tutorial videos with
 LearnDevNow. Subscribe today and save!
>>>http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>_______________________________________________
>>>Unicon-group mailing list
>>>Unicon-group@lists.sourceforge.net
>>>https://lists.sourceforge.net/lists/listinfo/unicon-group
>>>
>>>
>>>
>>------------------------------------------------------------------------------
>>Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>Discover the easy way to master current and previous Microsoft technologies
>>and advance your career. Get an incredible 1,500+ hours of step-by-step
>>tutorial videos with LearnDevNow. Subscribe today and save!
>>http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>_______________________________________________
>>Unicon-group mailing list
>>Unicon-group@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/unicon-group
>>
>>
>------------------------------------------------------------------------------
>Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>Discover the easy way to master current and previous Microsoft technologies
>and advance your career. Get an incredible 1,500+ hours of step-by-step
>tutorial videos with LearnDevNow. Subscribe today and save!
>http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>_______________________________________________
>Unicon-group mailing list
>Unicon-group@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/unicon-group
>
>
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to