posthog
posthog copied to clipboard
feat(hog): arrayMap, arrayExists, arrayFilter
Problem
Alternative to https://github.com/PostHog/posthog/pull/24636
Changes
Adds support for arrayMap, arrayExists, arrayFilter:
print(arrayMap(x -> x * 2, [1,2,3]))
print(arrayExists(x -> x like '%nana%', ['apple', 'banana', 'cherry']))
print(arrayFilter(x -> x like '%e%', ['apple', 'banana', 'cherry']))
These are built as STL functions that can call back closures
How did you test this code?
WIP