stregaml
stregaml copied to clipboard
Effects!
syntax:
effect Yield {
func yield(Int32);
}
effect IoYield = Yield | Io;
func generate() Yield { ... }
func get_int() Io -> Int32 { ... }
func input_stream() Io | Yield { ... }
func print_all(f: func() Yield) {
handle (f()) {
Yield::yield(x) => {
print(x);
continue;
}
return => {}
}
}