aqua/aqua-src/antithesis.aqua
2023-09-05 12:00:14 +02:00

20 lines
449 B
Plaintext

service Hello:
say_hello()
func foo():
on HOST_PEER_ID:
Hello "hello"
-- This closure will execute on HOST_PEER_ID
closure = ():
Hello.say_hello()
fn = func ():
Hello.say_hello()
-- Will go to HOST_PEER_ID, where Hello service is resolved, and call say_hello
closure()
-- Will be called on current peer, probably INIT_PEER_ID, and may fail
-- in case Hello service is not defined or has another ID
fn()