0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 17:24:15 +01:00
posthog/hogvm/__tests__/tuples.hog

20 lines
467 B
Plaintext
Raw Normal View History

2024-06-14 17:27:26 +02:00
print(tuple())
2024-06-20 16:05:15 +02:00
print((1,))
print((1, 2))
print((1, 2,))
print((1, 2, 3))
print((1, '2', 3))
print((1, (2, 3), 4))
print((1, (2, (3, 4)), 5))
let a := (1, 2, 3)
print(a[1])
print(a?.1)
print(a?.7)
print((1, (2, (3, 4)), 5)[1][1][1])
print((1, (2, (3, 4)), 5)?.1?.1?.1)
print((1, (2, (3, 4)), 5)?.[1]?.[1]?.[1])
print((1, (2, (3, 4)), 5)?.3?.6?.1)
print((1, (2, (3, 4)), 5)?.[3]?.[6]?.[1])
2024-06-20 16:05:15 +02:00
print((1, (2, (3, 4, ), ), 5, ).1.1.1)
print((1, (2, (3, 4)), 5)[1][1][1] + 1)