ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> language-dev
language-dev
Re: Iterator Syntax
by Buggs other posts by this author
May 8 2002 1:37AM messages near this date
Re: Iterator Syntax | Re: Iterator Syntax
On Tuesday 07 May 2002 16:24, Glen Starchman wrote:
>  On Tuesday 07 May 2002 02:47 am, Donal K. Fellows wrote:
[...]
>  Hm... originally, I had something that looked like this:
> 
>  iterator_function() (block_arg,...) { block_body}
> 
>  That turned out to be rather hard to debug, IMO.

ya IMO too

[...]
>  > [* Just one value at a time from the iteratable entity?  Nah.  But then
>  >    I'd go for iterating over more than one iteratable object at a time
>  > too. ]
> 
>  Some iterators return multiple values, if that's what you mean. It would be
>  rather trivial, for example, to create a String method that returned an
>  arbitrary number of chars per iteration:
> 
>  "hello".each(3) { |x| print ("chars=%s", x)
> 
>  => hel
>  => lo

what about
"hello".each(3)-> x  {print ("chars=%s", x)}
if you still have "-> " spare

think
x <-"hello".each(3) {print ("chars=%s", x)}
is funny

And hey is that all you let us know about your language ;P
come on give us an URL


Buggs
Thread:
Glen Starchman
Donal K. Fellows
Glen Starchman
Pixel
Glen Starchman
Buggs
Mathieu Bouchard
Buggs
Mathieu Bouchard
Glen Starchman

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved