aqua/aqua-src/closure.aqua
2022-03-03 17:54:45 +03:00

21 lines
314 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, ""