Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

685 B
Raw Blame
print('--- arrayMap ----')
print(arrayMap(x -> x * 2, [1,2,3]))

print('--- arrayExists ----')
print(arrayExists(x -> x like '%nana%', ['apple', 'banana', 'cherry']))
print(arrayExists(x -> x like '%boom%', ['apple', 'banana', 'cherry']))
print(arrayExists(x -> x like '%boom%', []))

print('--- arrayFilter ----')
print(arrayFilter(x -> x like '%nana%', ['apple', 'banana', 'cherry']))
print(arrayFilter(x -> x like '%e%', ['apple', 'banana', 'cherry']))
print(arrayFilter(x -> x like '%boom%', []))

print('--- arrayReduce ----')
print(arrayReduce((a, b) -> a + b, [1,2,3,4,5], 0))
print(arrayReduce((a, b) -> a + b, [1,2,3,4,5], 15))
print(arrayReduce((a, b) -> a - b, [5,10], 30))