mirror of
https://github.com/fluencelabs/aqua.git
synced 2025-03-15 03:30:49 +00:00
29 lines
473 B
Plaintext
29 lines
473 B
Plaintext
aqua A
|
|
|
|
export haveFun
|
|
|
|
ability Compute:
|
|
job() -> string
|
|
|
|
func lift() -> Compute:
|
|
job = () -> string:
|
|
<- "job done"
|
|
<- Compute(job)
|
|
|
|
ability Function:
|
|
run() -> string
|
|
|
|
func roundtrip{Function}() -> string:
|
|
res <- Function.run()
|
|
<- res
|
|
|
|
func disjoint_run{Compute}() -> Function:
|
|
run = func () -> string:
|
|
<- Compute.job()
|
|
<- Function(run = run)
|
|
|
|
func haveFun() -> string:
|
|
comp = lift()
|
|
fn = disjoint_run{comp}()
|
|
res <- roundtrip{fn}()
|
|
<- res |