On Wed, Dec 13, 2006 at 11:31:33AM -0800, Ovid wrote:
> *** Cannot use this control structure outside a 'routine' structure
> at 99.pugs line 103, column 13-22
>
> Take out the returns, and it works fine. Can someone tell me what I'm
> missing? Is this a bug.
Perl 6 differentiates betwe
On Wed, Dec 13, 2006 at 11:31:33AM -0800, Ovid wrote:
: In trying to compress a list, I wrote the following code:
:
: my $compress = do {
: my $previous;
: $compress = -> $x {
: if !defined $previous or $x ne $previous {
: $previous = $x;
: $x;
:
On Wed, Dec 13, 2006 at 10:55:28AM +0200, Gaal Yahas wrote:
: L stipulates the
: results of a gather are flattened to a lazy list. I'm not sure how far
: that flattenning goes, but one of these should do the trick, I think
It would only flatten a recursive structure with the help of something
that
In trying to compress a list, I wrote the following code:
my $compress = do {
my $previous;
$compress = -> $x {
if !defined $previous or $x ne $previous {
$previous = $x;
$x;
}
else {
();
}
};
}
On Tue, Dec 12, 2006 at 02:19:46PM -0800, Ovid wrote:
> First, how do I do introspection in Pugs? CPAN's Perl6::Bible hasn't
> been updated in a while, but the various ways to get a list of methods
> (from
> http://search.cpan.org/dist/Perl6-Bible/lib/Perl6/Bible/S12.pod#Introspection
> or http://