TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Functional Devs, how would you solve this more efficiently?(JS+Ramda)

2 点作者 davidgf大约 7 年前
Hi guys, first of all I just want to let you know that I'm a functional programming learner, and I'd love to see how more experienced people approach this problem. I have to process a list of email events (email was sent, email was bounced, email was a soft bounce or email was reported), aggregate them by an email campaign ID and update the corresponding counters. The solution I came up with and the test it must satisfy can be seen in this gist https://gist.github.com/davidgf/c03baedee14a758c406a58de99ea277a, but I'm not really satisfied, because it feels that I'm iterating over the entire list too many times. Given that I come from an imperative style background, I can figure out a much uglier but also much more efficient solution for this, but I wanted to see some FPer's take on this.

暂无评论

暂无评论