Bug 246140 - [WTF] Implement "reduce" function on WTF::Vector
Summary: [WTF] Implement "reduce" function on WTF::Vector
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-06 02:15 PDT by Matthieu Dubet
Modified: 2022-10-13 02:16 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Dubet 2022-10-06 02:15:59 PDT
WTF::Vector already has a "map" implementation, we should also have a "reduce" (="accumulate",="fold") operation.

https://en.wikipedia.org/wiki/Fold_(higher-order_function)
Comment 1 Matthieu Dubet 2022-10-06 02:41:22 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5075
Comment 2 Radar WebKit Bug Importer 2022-10-13 02:16:16 PDT
<rdar://problem/101117901>