Re: The pipe's sharp end

2005-05-07 Thread Brad Bowman
> What if you give it a 1-ary sub that you thought was slurpy, and in > fact does something different (hmm, that doesn't seem very likely). > How do we handle options and the like? .assuming ? Although map would be simpler, clearer and more flexible. > Still, semantics like that are dwimmery,

Re: The pipe's sharp end

2005-05-06 Thread Luke Palmer
On 5/6/05, Brad Bowman <[EMAIL PROTECTED]> wrote: > Hi, > > <$*IN> ==> process() ==> print; > > This A06 example got me thinking. > Could non-variadic subrountines in a pipeline be useful? > > A single arg sub or block could be a map without the "map": > > <$*IN> ==> &process ==> print; >

The pipe's sharp end

2005-05-06 Thread Brad Bowman
Hi, <$*IN> ==> process() ==> print; This A06 example got me thinking. Could non-variadic subrountines in a pipeline be useful? A single arg sub or block could be a map without the "map": <$*IN> ==> &process ==> print; # print map { process($_) } <$*IN> (1..6) ==> { $_++ } ==> say; A