aqua/aqua-src/closure.aqua

21 lines
314 B
Plaintext
Raw Normal View History

2021-11-04 19:22:57 +03:00
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)
2022-03-03 17:54:45 +03:00
<- true, ""