You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub effect yield<a>
ctl yield(elem : a) : ()
pub fun fin/take(it : () -> <yield<a>|e> (), n : int) : <yield<a>|e> ()
var count := 0
override handle it
ctl yield(elem)
if count < n then
yield(elem) // Forward the yield to our new yield function
count := count + 1
resume(())
else
()
Discussed in #599
Originally posted by chtenb October 24, 2024
According to the compiler, this syntax is invalid
But if I'm not mistaken, the syntax spec in the book says this should work: https://koka-lang.github.io/koka/doc/book.html#sec-handler-expressions
Which of the two is right?
The text was updated successfully, but these errors were encountered: