here on the mailinglist or via IRC.
I look forward to your feedback
thanks!
- Flavio S. Glock (fglock)
= $foo[]
' could be overloaded to the old behaviour.
Anyway, it's just a thought.
thanks!
- Flavio S. Glock
]()*$/{mul}() ) }
| \'\'
]
' );
Pugs::Compiler::Token-install( 'sum','
mul
[ \\+ sum { return $/{mul}()+$/{sum}() }
| \'\' { return $/{mul}() }
]
' );
my $s = shift;
my $match = main-sum( $s );
print $match-();
---
- Flavio S. Glock
.
This grammar is compiled to p5 using lrep.
- Flavio S. Glock
},
complement_previous = sub ($x) { $x 0 ?? 0 !! -Inf },
universe = $universe );
- Flavio S. Glock
the same thing after simplification
- Flavio S. Glock
view of how Lazy things (like Arrays) work).)
Thanks for reading!
- Flavio S. Glock
Can we have:
say 1..Inf;
to output an infinite stream, instead of just looping forever?
OTOH, it would be nice if
say substr( ~(1..Inf), 0, 10 )
printed 1 2 3 4 5.
Flattened lists would still loop forever (or fail):
say **(1..Inf);
$s = substr( ~( **(1..Inf) ), 0, 10 );
- Flavio S
Juerd:
2005/11/23, Juerd [EMAIL PROTECTED]:
Flavio S. Glock skribis 2005-11-23 10:13 (-0200):
Can we have:
say 1..Inf;
It's important, I think, to note that this isn't item context, but list
context. Str list context, but still list context. Which means 1..Inf
isn't stringified
laziness
as the list:
[EMAIL PROTECTED] - a lazy string if @list is lazy
[EMAIL PROTECTED] - a lazy number if @list is lazy
It would look like:
$foo = substr( [~](1..Inf), 10 );
my $revfoo := reverse $foo;
$revfoo ~~ s/foo/bar/g;
- Flavio S. Glock
was implementing lazy arrays (in the p5
backend), and most people found it was useless. But I thought I would
just ask again :)
- Flavio S. Glock
( @even, @odd ) = 0...;
- Flavio S. Glock
}
}
In the more general case:
part @a {
when $_ 10 { @a }
when $_ 20 { @b }
when $_ 30 { @c }
@d
};
and:
@a.part:{
when $_ 10 { @a }
when $_ 20 { @b }
when $_ 30 { @c }
@d
};
- Flavio S. Glock
I wonder if infinite sets (recurrences) will be supported - then I'll
move all(ext/Recurrence, ext/Span, ext/Set-Infinite) to
Perl6::Container::Set::Ordered - cool.
- Flavio S. Glock
2005/8/10, Dave Whipp [EMAIL PROTECTED]:
Luke Palmer wrote:
A new development in perl 6 land that will make
Just wondering - would 'reverse =$foo' call '$foo.previous()' ?
- Flavio
2005/7/29, Aankhen [EMAIL PROTECTED]:
On 7/29/05, Flavio S. Glock [EMAIL PROTECTED] wrote:
Is for = only for filehandles? I tried:
No, it's for anything that supports iteration... `=$foo` ==
`$foo.next()`, if I
for filehandles? I tried:
pugs say for =1
*** cannot cast from VInt 1 to Handle (VHandle)
- Flavio S. Glock
for it.
Thanks!
- Flavio S. Glock
17 matches
Mail list logo