>Tom suggested: > > Why not just check @numbers? >Hear, hear: > $sum = @numbers ? reduce ^_+^_, @numbers : 0; Although we're back to the pain of what happens when @numbers is really fn(). This is unsatisfactorily nonidempotent (aliapotent? :-) $sum = fn() ? reduce ^_+^_, fn() : 0; --tom
- Re: RFC 76 (v2) Builtin: reduce Tom Christiansen
- Re: RFC 76 (v2) Builtin: reduce Graham Barr
- Re: RFC 76 (v2) Builtin: reduce Nathan Wiger
- Re: RFC 76 (v2) Builtin: reduce Peter Scott
- Re: RFC 76 (v2) Builtin: reduce Tom Christiansen
- Re: RFC 76 (v2) Builtin: reduce Damien Neil
- Re: RFC 76 (v2) Builtin: reduce John Porter
- Re: RFC 76 (v2) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v2) Builtin: reduce John Porter
- Re: RFC 76 (v2) Builtin: reduce Damian Conway
- Re: RFC 76 (v2) Builtin: reduce Tom Christiansen
- Re: RFC 76 (v2) Builtin: reduce Damian Conway
- Re: RFC 76 (v2) Builtin: reduce Nathan Wiger
- Re: RFC 76 (v2) Builtin: reduce Tom Christiansen
- Re: RFC 76 (v2) Builtin: reduce Damian Conway