Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The first yield is just the effect name. There is a shorthand syntax for effects with only one function, such that you only define the name once:

effect ctl yield( i : int ) : bool

See bottom of this section https://koka-lang.github.io/koka/doc/book.html#sec-handling.

When handling the effect you don't 'define' the name, you implement it. Of course you have to mention the name then, just like e.g. with interface implementations



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: