Files
quartz-research-note/content/mimiumでMIDIインプットを実装.md

28 lines
635 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
date: 2024-10-30 15:42
---
#mimium
IOの順序保証とか考える
正格評価だとIOモナドとかはそもそも考える必要がない
[Algebraic Effects入門](https://v2.aintek.xyz/posts/introduction-to-algebraic-effects)
> `type 'a io = unit -> 'a`
> 純粋な値は以下のようなIOモナドにリフトできる。
> `let return x = fun () -> x`
> 計算はバインド演算子によってつなげることができる。
> `let (>>=) c1 c2 = fun () -> c2 (c1 ())`
mimiumだとバインド演算子ってこうか(ジェネリクスが必要だけども)
```rust
fn bind(f1,f2){
| | f1() |> f2
}
```