···11+// A generator effect with one operation
22+effect yield<a>
33+ fun yield( x : a ) : ()
44+55+// Traverse a list and yield the elements
66+fun traverse( xs : list<a> ) : yield<a> ()
77+ match xs
88+ Cons(x,xx) -> { yield(x); traverse(xx) }
99+ Nil -> ()
1010+1111+fun main() : console ()
1212+ with fun yield(i : char)
1313+ println("yielded " ++ i.show)
1414+ "Hello, World!".list.traverse