News for hackers. Stuff that matters.
Re:Coconut – Pythonic functional programming language by zardeh on Thursday June 23, 2016 @01:13PM (#11962668)
True, but I've used python a lot, and I've used reduce maybe...twice? (well, twice that I can find on my github at least)
Re:Coconut – Pythonic functional programming language by S4M on Thursday June 23, 2016 @02:05PM (#11963115)
I just counted the number of reduce I used in my current python project (6k lines). reduce comes up 32 times. And by comparison, map is used 159 times and filter 125 times - for some reason I tend to use list comprehensions less than I should.
Re:Coconut – Pythonic functional programming language by brianwawok on Thursday June 23, 2016 @03:28PM (#11963721)
I also thing you use map not a ton if you get the list comprehension syntax down... it is a map with less cruft mostly...
Re:Coconut – Pythonic functional programming language by baq on Thursday June 23, 2016 @02:18PM (#11963198)
curious how often reduce is used with something else than operator.add?
Re:Coconut – Pythonic functional programming language by S4M on Thursday June 23, 2016 @02:32PM (#11963327)
One occurence was to calculate the GCD of a list of polynomials.

In fact I had "reduce" appearing in the names of some of my variables so I used it less than 32 times, about 20 times in that project.

Re:Coconut – Pythonic functional programming language by d0mine on Thursday June 23, 2016 @05:00PM (#11964272)
I see nothing particularly inspiring in the examples posted on http://stackoverflow.com/questions/15995/useful-code-which-u...

Could you show your reduce calls?

Re:Coconut – Pythonic functional programming language by S4M on Thursday June 23, 2016 @07:01PM (#11964930)
They are very similar to this one from your link: http://stackoverflow.com/questions/15995/useful-code-which-u...