if the condition turns out to be false. Wouldn’t your
solution evaluate it unconditionally?
That can be solved with an explicit thunk:
sub infix:pv1 ($x, $cond) { $cond ?? ($x(),) !! () }; say 1, 2, {3} pv 1, 4
Or maybe 'is lazy' on $x?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
source tree, and since my code clearly won't be living there
I'd rather not write it there either.
Then at least read there. Good luck :-)
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
' } # equivalent to P5's qx//
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
On Thu, Jun 19, 2008 at 9:01 AM, Gaal Yahas [EMAIL PROTECTED] wrote:
On Thu, Jun 19, 2008 at 7:45 AM, Gabor Szabo [EMAIL PROTECTED] wrote:
What replaces backtick or qx{} ?
q:x{}, alternatively spelled qqx{}. From S02:
qq:x, that is of course.
--
Gaal Yahas [EMAIL PROTECTED]
http