aqua/aqua-src/closure.aqua
2021-11-04 19:22:57 +03:00

22 lines
319 B
Plaintext

module Closure declares *
export smth
service Srv("srv"):
noop: string -> ()
inside: -> ()
trial: -> ()
func smth() -> bool, string:
variable = "const"
co on "x":
Srv.trial()
closure = () -> string:
Srv.inside()
<- variable
on "other":
c <- closure()
Srv.noop(c)
<- true, "", 12