in reply to Re^2: Removing doubles and printing only unique values
in thread Removing doubles and printing only unique values

Coding styles are somewhat subjective so the question of better or worse is hard to answer. I will set out why I have coded the solution that way and, incidentally, point out that your code should be operating on the second field and not the first.

Thank you for making those suggestions (++), it was interesting to look again at my post in the light of your comments and question whether it was optimal or not. On balance I don't think I would change anything as I can justify to myself the reasons for coding it that way. I would be interested to know if others feel that my reasoning is flawed.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^4: Removing doubles and printing only unique values
by holli (Abbot) on Nov 02, 2017 at 00:18 UTC
    Maybe I was overly critical there. It's just the purist in me who says "Don't mix iterative and functional style".


    holli

    You can lead your users to water, but alas, you cannot drown them.