Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Fold a list using map splices

by hiseldl (Priest)
on Feb 20, 2003 at 21:28 UTC ( #237232=note: print w/replies, xml ) Need Help??


in reply to Re^3: Fold a list using map splices
in thread Fold a list using map splices

Ok. After more experimentation, I understand your point. Basically the question you are asking me is "why should I iterate over the last part of the list that may not exist?"

So, what I need to do is change the list at the end of the map, to a list that will be used to count the new elements, rather than counting all of the elements in the original list.

While I still disagree with you about "right" and "wrong," you have made a valuable point which makes the map more efficient. Thank you.

--
hiseldl
What time is it? It's Camel Time!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://237232]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2022-05-29 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?