So I'm finally starting to implement multi-level invocants in MMDs.
I'd like to sanity check some cases first, though.
Are these two assumed to be identical?
multi sub foo ($x, $y)
multi sub foo ($x, $y : )
But these two are _not_ identical?
multi sub foo ($x : $y : $z)
multi
Uri Guttman wrote:
i can't spit out the syntax but here is the conceptual way i would do
it. we do have multidimensional slices so we could grab each slice
(maybe with zip?) and pass that to [+] and then grab the list of results
back into a array/matrix with one less dimension than the original.
HaloO Luke,
you wrote:
I wonder how we specify meta
operators that only work on comparators, or only on assignment forms,
or etc. etc. etc.
Well, Perl6 has got first class Code types, hasn't it?
So it's a matter of defining a type hierarchy among the
operators and then you can dispatch on them
Mark == Mark A Biggar [EMAIL PROTECTED] writes:
Mark The usual definition of reduce in most languages that support it, is
Mark that reduce over the empty list produces the Identity value for the
Mark operation.
In Smalltalk, the equivalent of reduce is inject:into:, so a
sum reduce looks like:
John Macdonald wrote:
... (and there may be additional
operator attributes that make sense there too, although none
come immediately to mind).
Well, I wonder why people neglect the fact that the neutral/identity
element is not a property of the operator alone?! Besides the
associativity and
John Macdonald wrote:
Is there a built-in operator that doesn't have a meaningful
identity value? I first thought of exponentiation, but it has
an identity value of 1 - you just have to realize that since
it is a right associative operator, the identity has to be
applied from the right.
Well the
Mark A. Biggar wrote:
Well the identity of % is +inf (also right side only).
I read $n % any( $n..Inf ) == $n. The point is there's no
unique right identity and thus (Num,%) disqualifies for a
Monoid. BTW, the above is a nice example where a junction
needn't be preserved :)
E.g. if XY is left
Hola,
Some of us on #perl6 bitched once more about how lazy will make our
IO brain hurt a lot.
The concensus is that a lazy context has not been discussed yet.
Here is a proposal for lazyness defined with coroutines.
we have a lazy modifier:
my $a = lazy { get_value(5, 10) };
C. Scott Ananian wrote:
I think Ingo was trying to explicitly specify the normally-implicit
invocant; ie, invoke the method via the reference *without* using a '.'.
If this is possible (and I think it is), it's not (yet) clear what the
syntax would be. Maybe
$ref(Foo.new():)
I think for MMD
On Thursday 19 May 2005 09:39, Luke Palmer wrote:
On 5/19/05, Edward Cherlin [EMAIL PROTECTED] wrote:
It turns out that the domain and range and the location of
the cut lines have to be worked out separately for different
functions. Mathematical practice is not entirely consistent
in
On Thursday 19 May 2005 12:48, Uri Guttman wrote:
LP == Luke Palmer [EMAIL PROTECTED] writes:
LP On 5/18/05, Anthony Heading [EMAIL PROTECTED] wrote:
Is there a way to target hyperoperators at different axes
of a multi-dimensional array? This is an attractive
feature of various
On Thursday 19 May 2005 19:51, Sam Vilain wrote:
Edward Cherlin wrote:
Here is the last answer from Ken Iverson, who invented
reduce in the 1950s, and died recently.
file:///usr/share/j504/system/extras/help/dictionary/intro28
.htm
On Fri, 20 May 2005, Yuval Kogman wrote:
then it is not finalized into a real value. Here's how the range
operator would be implemented:
sub infix:.. ($from, $to where { $to $from }){ reverse $to ..
$from }
sub infix:.. ($from, $to) { lazy gather {
while ($from =
On Fri, May 20, 2005 at 05:15:24PM -0400, C. Scott Ananian wrote:
On Fri, 20 May 2005, Yuval Kogman wrote:
then it is not finalized into a real value. Here's how the range
operator would be implemented:
sub infix:.. ($from, $to where { $to $from }){ reverse $to ..
$from }
On Fri, May 20, 2005 at 17:15:24 -0400, C. Scott Ananian wrote:
This is very elegant. It might be worthwhile for someone to attempt to
define a 'core
perl' set of operators, etc, so that the 'rest of perl' can be defined in
perl proper...
Have a look at synopsis 29... For documentation
Mark A. Biggar wrote:
Well the identity of % is +inf (also right side only).
I read $n % any( $n..Inf ) == $n. The point is there's no
unique right identity and thus (Num,%) disqualifies for a
Monoid. BTW, the above is a nice example where a junction
needn't be preserved :)
If as usual
16 matches
Mail list logo