mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-03-28 08:41:16 +00:00
14 lines
431 B
Plaintext
14 lines
431 B
Plaintext
import "println.aqua"
|
|
import "builtin.aqua"
|
|
|
|
-- functions like `c` are called an 'arrow function' in Aqua
|
|
-- `c` passed to a function from a client, so, it could be called only on a client
|
|
func passFunctionAsArg(node: string, str: string, c: string -> string):
|
|
on node:
|
|
Peer.identify()
|
|
-- we go here back on a client
|
|
res <- c(str)
|
|
-- then return on a node
|
|
Peer.identify()
|
|
print(res)
|