in reply to Re^3: Functional Composition
in thread Functional Composition

No problem, It does provoke a random question though: If you overload a short-circuited operator, does it still short-circuit? I mean if the result of an intermediate operation returned a false value, would the whole expression end up false?

Bill H
perl -e 'print sub { "Hello @{[shift->()]}!\n" }->(sub{"World"})'

Replies are listed 'Best First'.
Re^5: Functional Composition
by ikegami (Patriarch) on Dec 18, 2009 at 01:09 UTC
    Turns out you can't overload them. If there's an object on the LHS, it will have its "bool" overload called. An object on the RHS will simply be returned if the LHS is true.