Re: Cmmposition binop

2005-05-05 Thread Michele Dondi
On Thu, 5 May 2005, Stuart Cook wrote: What I refer to now is something that takes two {coderefs,anonymous subs,closures} and returns (an object that behaves like) another anonymous sub, precisely the one that acts like the former followed by the latter (or vice versa!). Do you mean like the

Re: Cmmposition binop

2005-05-04 Thread Stuart Cook
What I refer to now is something that takes two {coderefs,anonymous subs,closures} and returns (an object that behaves like) another anonymous sub, precisely the one that acts like the former followed by the latter (or vice versa!). Do you mean like the mathematical 'f o g'? i.e. (f o g)($x)

Re: Cmmposition binop

2005-05-04 Thread Rob Kinyon
What about the function compose() that would live in the module keyword, imported by the incantation use keyword qw( compose );? (NB: My P6-fu sucks right now) multimethod compose (@*List) { return { $_() for @List; }; } On 5/4/05, Michele Dondi [EMAIL PROTECTED] wrote: I had

Re: Cmmposition binop

2005-05-04 Thread Ingo Blechschmidt
Hi, Rob Kinyon wrote: What about the function compose() that would live in the module keyword, imported by the incantation use keyword qw( compose );? FWIW, I like o better -- function composing is very often used in FP, and should therefore have a short name. Luckily, it's very easy to