Bend/tests/golden_tests/run_lazy/tuple_rots.bend
2024-05-15 00:25:46 +02:00

11 lines
255 B
Plaintext

MkTup8 = @a @b @c @d @e @f @g @h @MkTup8 (MkTup8 a b c d e f g h)
rot = λx (x λa λb λc λd λe λf λg λh (MkTup8 b c d e f g h a))
app = λn switch n {
0: λf λx x
_: λf λx (app n-1 f (f x))
}
main = (app 100 rot (MkTup8 1 2 3 4 5 6 7 8))