Here's a good Perl 6 final exam question:
Spot the mistake (hint: it's not in the math):
module Complex;
sub i() is export {
Complex.new(0,1)
}
multi sub infix:+ (Complex $left, Complex $right) is export {
Complex.new($left.real + $right.real, $left.imag +
On Sun, Sep 04, 2005 at 07:55:21 +, Luke Palmer wrote:
Here's a good Perl 6 final exam question:
Spot the mistake (hint: it's not in the math):
module Complex;
sub i() is export {
Complex.new(0,1)
}
multi sub infix:+ (Complex $left, Complex $right) is
On 9/4/05, Yuval Kogman [EMAIL PROTECTED] wrote:
I always saw scoping of multis as something that applies to the
variants...
multi sub foo {
}
{
my multi sub foo {
}
# New Ticket Created by Joshua Hoblitt
# Please include the string: [perl #37067]
# in the subject line of all future correspondence about this issue.
# URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37067
This patch fixes a few typos, 81 char lines, and makes a couple of other
# New Ticket Created by Bernhard Schmalhofer
# Please include the string: [perl #37068]
# in the subject line of all future correspondence about this issue.
# URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37068
Hi,
I have add t/examples/japh.t, which tests the JAPHs in
This patch fixes a few typos, 81 char lines, and makes a couple of other
exceedingly minor tweaks.
Thanks applied in r9136.
I should have added that this patch does s/behaviour/behavior/g. Which
brings up the issue of: which English are we using for docs?
That would be a question for
[...]
t/examples/japhNOK 2
# Failed test (t/examples/japh.t at line 49)
# got: 'tsuJona rehtraP torkcaHp
# r'
# expected: 'Just another Parrot Hacker
# '
t/examples/japhok 15/15# Looks like you failed 1 test of
15.
On Sun, 2005-09-04 at 03:47 -0700, Bernhard Schmalhofer via RT wrote:
I should have added that this patch does s/behaviour/behavior/g. Which
brings up the issue of: which English are we using for docs?
That would be a question for Chip, or do we have a 'docs' pumkin?
For what it's worth,
Folks,
I recently needed to write a series of codes on lambda calculus in
perl. As MJD has shown Perl 5 can handle lambda calculus but I am
beginning to get tired of whole bunch of 'my $x = shift' needed.
our $ZERO =
sub { my $f = shift;
sub { my $x = shift; $x }};