# from Ken Williams
# on Monday 27 February 2006 01:18 pm:
>In your example code for dice(), you have:
>
> $l->map(\&fx)->dice(sub {that_function(@_)})->map(\&fy);
>
>Is that equivalent to:
>
> $l->map(\&fx)->dice(\&that_function)->map(\&fy);
Yes, except the former illustrates that dice() requires you to use the
@_ variable rather than $_ as in map and grep. I'm also partly trying
to illustrate the analogy to
L(that_function($l->map(\&fx)))->map(\&fy);
where calling dice() turns @{$l->map(\&fx)} into @_ and allows you to
chain the processing rather than having an LR chain within an RL chain
which is then wrapped and fed into yet another LR chain.
As you can see, I could use some help making that crystal clear :-)
--Eric
--
The opinions expressed in this e-mail were randomly generated by
the computer and do not necessarily reflect the views of its owner.
--Management
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------