generated at
abstraction handler



koka(js)
fun catch( hnd : (string) -> e a, action : () -> <raise|e> a ) : e a with ctl raise(msg) hnd(msg) action()
引数にactionを取る
この関数の本質はhandlingだけで、実際にどういう処理をするのかは利用者が決められる
こんな感じで with abstractionHandler() という感じで使う
koka(js)
fun catch-example() with catch( fn(msg){ println("error: " ++ msg); 42 } ) safe-divide(1,0)