0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 21:49:51 +01:00
posthog/hogvm/__tests__/tuples.hog
2024-07-18 14:20:38 +02:00

20 lines
467 B
Plaintext

print(tuple())
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[2])
print(a?.2)
print(a?.8)
print((1, (2, (3, 4)), 5)[2][2][2])
print((1, (2, (3, 4)), 5)?.2?.2?.2)
print((1, (2, (3, 4)), 5)?.[2]?.[2]?.[2])
print((1, (2, (3, 4)), 5)?.4?.7?.2)
print((1, (2, (3, 4)), 5)?.[4]?.[7]?.[2])
print((1, (2, (3, 4, ), ), 5, ).2.2.2)
print((1, (2, (3, 4)), 5)[2][2][2] + 1)