aloerina01 / til

1日1つだけ強くなる
6 stars 0 forks source link

2018/11/20 algebraic effects #78

Open aloerina01 opened 5 years ago

aloerina01 commented 5 years ago

高校の数ⅢCとかやってたときによく陥った「何言ってるのか全然咀嚼できない」状態に久々になった感じ。恥ずかしいことに全然わからず3周くらい読み返した。でもまだちゃんと分かってないことは分かる。

Algebraic Effectsとは? 出身は? 使い方は? その特徴とは? 調べてみました! - Qiita

JS風に書かれたイメージを掴むためのソース

// effect invocation
effect Foo /* : int -> int */;

// handler
handle(console.log(perform/* invocation */ Foo(3) + 10)) {
    case x: {
       x;
    }

    case Foo(x), k: {
        k(x * x);
    }
}

//==> prints `19`

algebric effectsの基本は

らしい。

delimited continuationの夏 / lilyum ensemble

aloerina01 commented 5 years ago

Error Boundaries – React