On Tue, May 03, 2005 at 09:53:59PM +0800, Autrijus Tang wrote:
: On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote:
: > : # Type Instantiation?
: > : sub apply (&fun<::a> returns ::b, ::a $arg) returns ::b {
: > : &fun($arg);
: > : }
: >
: > The first parameter would be &fun
Autrijus Tang wrote:
On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote:
: # Type Instantiation?
: sub apply (&fun<::a> returns ::b, ::a $arg) returns ::b {
: &fun($arg);
: }
The first parameter would be &fun:(::a) these days, but yes.
(Stylistically, I'd leave the & off t
On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote:
> : # Type Instantiation?
> : sub apply (&fun<::a> returns ::b, ::a $arg) returns ::b {
> : &fun($arg);
> : }
>
> The first parameter would be &fun:(::a) these days, but yes.
> (Stylistically, I'd leave the & off the call.
On Tue, May 03, 2005 at 05:06:15PM +0800, Autrijus Tang wrote:
: With the recent discussion on type sigils, and the fact that Pugs
: is moving toward the OO core, I'd like to inquire how the following
: statements evaluate (or not):
:
: # Compile time type arithmetic?
: ::Dual ::= ::Str |