‹ BackHN Continuity

Thread

Anecdotally, programmers dislike "reduce"

175 points · 283 comments · vinhnx

  1. kevinwang · · focus · HN ↗
    In python: I've always thought it's funny that of the list functions (map, filter, reduce?), reduce is the one that was removed, but is the only one that I occasionally reach for. (When I remember it doesn't exist, I'm usually happy to write the more readable three-line for loop.)

    The other two can be simply expressed as a list comprehension, but afaik you can't with reduce (and if you can, it's probably awful).

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.