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

there was an "and" in that sentance

There was a possibility that you meant "and therefore". If not, then you can ignore the top half while others benefit from it.

Replies are listed 'Best First'.
Re^4: Functional Composition
by billh (Pilgrim) on Dec 17, 2009 at 22:02 UTC

    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"})'
      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.