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
Rather than defining a regular function accepting a closure and then putting a handler inside it, dedicated syntax for preparing handlers around a deferred execution would be nice. It is just syntax sugar in the end, but needs two things:
a way to define such a prepared handler
a way to apply the prepared handler to the rest of the current sequence
Defining a prepared handler (no syntax yet, just use a regular proc-accepting-proc):
proc noop_logger!(body) {
return with body!()
when 'log(x) resume unit
else yield
}
Applying a prepared handler:
proc no_log!() {
use noop_logger
yield 'log("hello")
}
Rather than defining a regular function accepting a closure and then putting a handler inside it, dedicated syntax for preparing handlers around a deferred execution would be nice. It is just syntax sugar in the end, but needs two things:
Defining a prepared handler (no syntax yet, just use a regular proc-accepting-proc):
Applying a prepared handler:
Expands to:
The text was updated successfully, but these errors were encountered: