Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Will the sorting order of an array used in producing new arrays be retained?

by hippo (Abbot)
on Oct 09, 2012 at 21:21 UTC ( #998084=note: print w/replies, xml ) Need Help??


in reply to Will the sorting order of an array used in producing new arrays be retained?

Very quick answers:

  1. Yes.
  2. Yes, so long as your function doesn't monkey with the order.

Good luck!

  • Comment on Re: Will the sorting order of an array used in producing new arrays be retained?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998084]
help
Chatterbox?
[Corion]: choroba: Yeah - I found that if you have the "right" datastructure from the start, it's fairly easy, but if you have some global datastructure that you mutate, you have to rewrite a lot to pass around the results instead.
[Corion]: I find the process quite similar to (in Prolog) passing around an accumulator variable in recursive predicates

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-12-11 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (289 votes). Check out past polls.

    Notices?