Re: return() in pointy blocks
by =22TSa_=28Thomas_Sandla=DF=29=22 other posts by this author
Jun 8 2005 9:38AM messages near this date
Re: return() in pointy blocks
|
Re: return() in pointy blocks
Piers Cawley wrote:
> [..] then I think it means we can write:
>
> sub call-with-current-continuation(Code $code) {
> my $cc = -> $retval { return $retval }
For the records: the return here is the essential ingredient, right?
Without it the block would be evaluated or optimized away to an undef
or some such.
> $code($cc);
> }
>
> Which I personally think is rather cute.
Me too!
> Even if I can't quite bring myself to
> believe it's that simple...
I have convinced myself.
How can I be of assistance on your side?
--
TSa (Thomas Sandlaß)
Thread:
Piers Cawley
Luke Palmer
Larry Wall
=22TSa_=28Thomas_Sandla=DF=29=22
|