aqua/aqua-src/antithesis.aqua

29 lines
473 B
Plaintext
Raw Normal View History

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