2023-10-23 20:59:55 +07:00
|
|
|
aqua A
|
2023-09-27 14:07:22 +02:00
|
|
|
|
2023-10-23 20:59:55 +07:00
|
|
|
export test
|
2023-09-27 14:07:22 +02:00
|
|
|
|
2023-10-23 20:59:55 +07:00
|
|
|
ability InnerAb:
|
|
|
|
arrow() -> i8, i8
|
2023-09-27 14:07:22 +02:00
|
|
|
|
2023-10-23 20:59:55 +07:00
|
|
|
ability TestAb:
|
|
|
|
inner: InnerAb
|
2023-09-27 14:07:22 +02:00
|
|
|
|
2023-10-23 20:59:55 +07:00
|
|
|
-- func create(a: i8, b: i8) -> TestAb:
|
|
|
|
-- arrow = () -> i8, i8:
|
|
|
|
-- <- a, b
|
|
|
|
-- <- TestAb(inner = InnerAb(arrow = arrow))
|
|
|
|
--
|
|
|
|
-- func test() -> i8, i8, i8, i8, i8, i8:
|
|
|
|
-- Ab <- create(1, 2)
|
|
|
|
-- ab <- create(3, 4)
|
|
|
|
-- AB <- create(5, 6)
|
|
|
|
-- res1, res2 <- ab.inner.arrow()
|
|
|
|
-- res3, res4 <- Ab.inner.arrow()
|
|
|
|
-- res5, res6 <- AB.inner.arrow()
|
|
|
|
-- <- res1, res2, res3, res4, res5, res6
|
2023-09-27 14:07:22 +02:00
|
|
|
|
2023-10-23 20:59:55 +07:00
|
|
|
func create(a: i8, b: i8) -> i8 -> i8, i8:
|
|
|
|
arrow = (c: i8) -> i8, i8:
|
|
|
|
<- a, b
|
|
|
|
<- arrow
|
2023-09-27 14:07:22 +02:00
|
|
|
|
2023-10-23 20:59:55 +07:00
|
|
|
func test() -> i8, i8, i8, i8, i8, i8:
|
|
|
|
Ab <- create(1, 2)
|
|
|
|
ab <- create(3, 4)
|
|
|
|
AB <- create(5, 6)
|
|
|
|
<- res1, res2, res3, res4, res5, res6
|